Saturday, September 11, 2010

[android-developers] How to launch the app from the Web page?

I added to the manifest file for the activity to be launched:

<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:scheme="my_scheme"/>
</intent-filter>

I load the link in WebView:

mWebView.loadData("<a href=\"my_scheme://launch_my_app/refresh_all
\">Launch App</a>", "text/html", "utf-8");

When I click on the link I get the error -10 "The protocol is not
supported" in My WebViewClient.OnReceivedError override.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment