I have a following intent filter:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="content" android:host="my.company.name" />
</intent-filter>
But it does not match the following Intent:
Uri uri = new Uri.Builder().scheme("content").authority("my.company.name").appendPath("names").build()
uri = Uri.withAppendedPath(uri, id1);
uri = Uri.withAppendedPath(uri, "data");
startActivity(new Intent(Intent.ACTION_VIEW, uri));
Why does this happen?
It may be that you cannot register an activity for the content scheme, as that is used by the content provider system.
If your activity really is backed by content providers, use the MIME type for the content instead, such as:
<data android:mimeType="vnd.android.cursor.dir/vnd.google.note" />
If this relates to your other recent SO question, you may wish to follow the advice of the Google employee who answered that question. Here is a sample project demonstrating this technique, particularly the third <intent-filter> in the manifest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With