尝试使用 textview 处理 http
Pattern httpMatcher = Pattern.compile("https?://.*");
String httpViewURL = "myhttp";
Linkify.addLinks(label, httpMatcher, httpViewURL);
清单文件:
<activity android:exported="false"
android:name="*****.URLClickedActivity">
<intent-filter>
<category android:name="android.intent.category.DEFAULT"/>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="myhttp" />
</intent-filter>
</activity>
无论如何,我明白了:
未找到处理 Intent { act=android.intent.action.VIEW dat= 的 Activity (有额外的)} *