This is a blog with the example you need. It helped me a lot. Blog Link
Code from the blog how you can do this.
In your main task "Links". In this way.
mTextSample = (TextView) findViewById(R.id.text1); text = "<html>Visit my blog <a href=\"http://sherifandroid.blogspot.com\">mysite</a> or run the <a href=\"sherif-activity://myactivity?author=sherif&nick=king\">myactivity</a> callback</html>"; mTextSample.setText(Html.fromHtml(text)); mTextSample.setMovementMethod(LinkMovementMethod.getInstance());
To get the parameters:
TextView mTextSample = (TextView) findViewById(R.id.text); mTextSample.setText(getIntent().getData().getQueryParameter("author")); mTextSample = (TextView) findViewById(R.id.text1); mTextSample.setText(getIntent().getData().getQueryParameter("nick"));
In the manifest, declare the second action as:
<activity android:label="@string/app_name" android:name="sherif.android.linkify.example.TestActivity"> <intent-filter> <data android:scheme="sherif-activity" android:host="myactivity"/> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE"/> </intent-filter> </activity>
source share