tags:

views:

41

answers:

1

One of the activities in my app has an intent-filter with:

  • Action - VIEW
  • Categories - DEFAULT
  • BROWSABLE

Data - scheme is 'myapp123'. I want to start this activity from another application using the Intent but I get NoActivityFoundException. Even if I type myapp123:// from the browser, it doesn't get called. Any help on resolving this issue will be appreciated.

AndroidManifest.xml

<activity android:name="TwitterStatus" android:label="TwitterStatus">
<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <DATA android:scheme="myapp123" />
</intent-filter>
</activity>

actually I have this callback address for OAuth authentication to Twitter

mTwitterCallBack = "myapp123://twittercallback" ;

after authenticating by twitter the browser itself tries to search for this URI

for the purpose of testing, I have put a test option in one of the activities as follows

Activity

Intent tstIntent = new Intent (Intent.ACTION_VIEW, Uri.parse(mTstURI)) ;  
// value of mTstURI entered at runtime - myapp123://twittercallback
try {
 startActivity(tstIntent) ;
} catch (ActivityNotFoundException e) {
    e.printStackTrace();
}   

// always catches the exception.
A: 

add the host

<data android:scheme="myapp123" host="twittercallback" />

and try again

Jorgesys
I had this filter earlier, just removed it for troubleshooting.