Update 23/9/2013
This question is outdated as the things mentioned below are 80% deprecated for now.
For my application there is one tab host with 5 different activities for 5 tabs. One of those is actually an activity group, which contain 4 child activities, and users can go back and fro for these child activities.
Now one of the child activities is used to post tweet. The OAUTH thing is fine. However I find that the callback cannot actually point back to the activity but the parent activity group or even the tab activity. I am not sure where does it points to but the outcome is that when the user authorize my twitter app, and return to the android app, the activity will be started all over and called onCreate instead of onResume or onNewIntent. This causes an infinity loop , asking the user to authenicate again and again. I have tried to add android:launch:singleInstance but this does not help.
If I do not start the activity as a child but a new activity, everything is fine.I can get back to onNewIntent and successfully post tweets. So I am quite sure the cause is activity group or tab activity.
I am actually not very familiar of how intent filter works under tab / activity group, can anyone explain the case for me?
Manifest.xml
<activity android:name="TwitterAct" android:launchMode="singleInstance">
<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="myapp" android:host="twitteract" />
</intent-filter>
</activity>
TwitterAct
private final String CALLBACKURL = "myapp://twitteract";
Thanks