I have a problem implementing Oauth in Android using signpost library. Everything is fine except the final part when it should return to the application itself after granting access.
Below is my activity callback declaration in manifest:
<activity android:name="ro.locationsApp.android.login.LoginScreenActivity"
android:screenOrientation="portrait"
android:launchMode="singleTask">
<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="http" android:host="myCallbackHost"/>
</intent-filter>
</activity>
And I pass the Callback URL from code like this:
new OAuthHelper("mySite", "secret",
"https://www.googleapis.com/auth/userinfo.profile", "http://myCallbackHost");
Where myCallbackHost it’s a real and functional link(it’s also used for callback after a web site authentication – now I want mobile too).
The problem is that my android app is not called after this. I also tried
<data android:scheme="customScheme"/>
and
new OAuthHelper("mySite", "secret",
"https://www.googleapis.com/auth/userinfo.profile", "customScheme:///");
but without success.
Thanks,
Alex.
Changing http with something else works.
Here is how my manifest looks now:
and code:
works like a charm.