1.
Pattern wikiWordMatcher = Pattern.compile("(http://|ftp://|https://|www.){0,1}[a-zA-Z0-9\\-\\.]+?\\.(org|edu|uk|hk|com|net|cn|me|tw|fr|be)[^\\s]*"); //定义正则表达式
String mentionsScheme = String.format("%s/?%s=",Constants.MENTIONS_SCHEMA, Constants.PARAM_UID); //格式化字符串,指定跳转意图
Linkify.addLinks(textView, wikiWordMatcher, mentionsScheme); //将TextView的字符串根据正则去替换为链接
2.
然后在清单文件中修改要跳转的Activity的意图
<activity android:name="com.xxx.xx.XxxActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="scheme" android:host="host"/>
</intent-filter>
</activity>
3.
然后在跳转的目标页面通过 getIntent().getData().getQueryParameter("key");获取参数后进行处理
ps:意图中可以使用
schema://host:port/path?key=value的方式来传递参数