There are many samples, especially for Twitter. This one seems to be one of the most complete, so I cracked it:
https://github.com/brione/Brion-Learns-OAuth
However, all samples are mainly proof of concept code. All of them have rough edges, for example, leaving a broken task stack when launched through the browser. I have an application in which I play, working basically the way I want, declaring it singleTask and causing the browser to go to the original task instead of starting a new action:
<activity android:name=".MainActivity" android:label="@string/app_name" android:launchMode="singleTask"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
However, I am wondering if there are better ways to handle this, for example, popping a modal WebView so the user can go through the auth process?
I guess for Twitter, in particular, the βrightβ thing is probably to exchange for xauth. But I still would like to know, generally speaking, is there anything different from OAuth, the quality of execution for Android there?
source share