Yaya
Yaya

Reputation: 620

android url redirection

i have links like below .

exact url

 <a href="activity_a://lookup/gelismeler">gelismeler</a>den 

in textview i enabled links using the links above i want to open the speficied activity . but, i get

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=activity_a://lookup/gelismeler (has extras) }

my manifest xml contains lines below

 <intent-filter>
                        <action android:name="android.intent.action.VIEW" />
                        <action android:name="android.intent.action.DEFAULT" />

                        <category android:name="android.intent.category.BROWSABLE" />

                        <data
                            android:host="lookup"
                            android:scheme="activity_a" />
                    </intent-filter>

so what is wrong here ? how can i open link redirected to myactivityname://functionname/parameters to myactivity => function => with parameters ..

thanks in advance

edit: some changes made acc. to @CommonsWare suggestions

Upvotes: 1

Views: 948

Answers (2)

Yaya
Yaya

Reputation: 620

http://android-developers.blogspot.com/2009/11/integrating-application-with-intents.html

this a good guide for custom intent filters ...

Upvotes: 0

CommonsWare
CommonsWare

Reputation: 1006539

Step #1: Get rid of LOOKUP, since there is no such action.

Step #2: Add <category android:name="android.intent.category.DEFAULT" />, as I do not link that links in a TextView use BROWSABLE.

Step #3: Keep your schemes in lowercase, as I think that's a requirement of schemes.

Upvotes: 1

Related Questions