I'm trying to open a certain set of activities inside my application and for that I have added a custom uri scheme in my AndroidManifest file.
The problem here is when I use these link inside a TextView I get the following exception:
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=numbers://imnumbers.com/buynumber (has extras) }
While from a WebView (links clicked inside a WebView) everything works fine. I've searched the web extensively for a solution to no avail.
This is how I parse html for TextView:
textView.setText(Html.fromHtml(message.getContent()));
textView.content.setMovementMethod(LinkMovementMethod.getInstance());
I've tried this answer but it just doesn't work. Nothing happens when I click on links.
UPDATE: The custom uri scheme is defined as follows:
<activity
android:name=".simcard.NewBuySimCardActivity"
android:label="@string/title_activity_new_buy_sim_card">
<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:host="imnumbers.com"
android:pathPrefix="/buynumber/"
android:scheme="numbers"/>
</intent-filter>
</activity>