Sunday, November 29, 2009

[android-developers] Re: custom protocol handler...

Hi,
I tested this with an embedded WebView, and it works. Not sure why the
intent-filter isn't visible to Browser app.

On Nov 12, 1:09 am, sdphil <phil.pellouch...@gmail.com> wrote:
> i want to do the following thing -
>
> when a user navigates to a web page, I want to have a link in there
> that looks like this:
>
>     <p><a href="myprotocol://blah=42">Click here for fun.</a></p>
>
> Then when the user clicks on that from the phone browser, I want it to
> launch my intent with that full url.
>
> In my AndroidManifest.xml file, I have the following info:
>
>     <activity android:name="com.test.MyActivity" style="@style/
> MyStyle">
>                 <!-- custom protocol association -->
>                 <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="myprotocol"/>
>                 </intent-filter>
>     </activity>
>
> When I try this, when I click on the link on the web page from the
> phone browser, it says --
>
> Web page not available
> The Web page at myprotocol://blah=42 might be temporarily down or it
> may have moved permanently to a new web address.
>
> Any help here would be appreciated.
>
> tia.

--
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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate