So, I click on this link:
<a href="intent://www.google.com#Intent;scheme=http;action=android.intent.action.VIEW;end">Google</a>
(I know his stupid example, as it may be http://www.google.com , but its illustration of the problem)
I defined this URI from
Log.v(new Intent(Intent.ACTION_VIEW).setData(Uri.parse("http://www.google.com")).toUri( Intent.URI_INTENT_SCHEME));
In logcat, I see the following:
08-02 08:32:34.708 I/ActivityManager( 71): Starting activity: Intent { act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=http://www.google.com cmp=com.android.browser/.BrowserActivity } 08-02 08:32:34.748 E/Tab ( 4188): onReceivedError -10 intent://www.google.com
Instead of redirecting to www.google.com, I get the "Webpage Unavailable" page.
If I run identical intentions using the binary am , it succeeds.
adb -e shell am start -d http:
I see this in logcat
08-02 08:47:42.488 I/ActivityManager( 71): Starting activity: Intent { act=android.intent.action.VIEW dat=http://www.google.com flg=0x10000000 cmp=com.android.browser/.BrowserActivity }
The ultimate goal is to have a URL that triggers a certain activity in the application (and cannot someone get to this page without installing the application). I know that I can also define a custom schema, but since this is a global namespace, I would not do that. I also know that for this purpose I can use http: //, but I do not want the user to be prompted to open the URL in a browser or my application.
Any ideas?
source share