androidoauth

Android : Handle OAuth callback using intent-filter


I am building an Android application that requires OAuth. I have all the OAuth functionality working except for handling the callback from Yahoo. I have the following in my AndroidManifest.xml :

  <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:host="www.test.com" android:scheme="http"></data> 
  </intent-filter>

Where www.test.com will be substituted with a domain that I own. It seems :

So can anybody help me with

Thanks for your help.


Solution

  • So I changed my approach to use a custom scheme, rather than a web URL and it now all works as expected.

    So my callback URL is:
    X://callback

    and my intent-filter is:

    <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="X"></data> 
    </intent-filter>
    

    where X is the name of my customer scheme.