views:

111

answers:

2

I am making twitter application in which i open browser for user authentication and i pass call_back URL when launching authentication browser

problem is after authenticating it is calling again oncreate of TWitterShare class instead calling onNewIntent method, why is that ? my another class working fine i am unable to find difference any idea by looking at the following ocde why it is calling oncreate again ?

            <activity android:name=".TwitterShare"
            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="oauth1" />
                </intent-filter>
            </activity>


@Override
    protected void onNewIntent(Intent intent) {

        super.onNewIntent(intent);
  }
+1  A: 

Shame on me and all of you guys, small thing to fix

launchMode="singleInstance" instead use android:launchMode="singleInstance"

Faisal khan
A: 

Hi

I am doing the same thing but i can not come back from browser to my application means i think i am not clear with this line " data android:scheme="myapp" android:host="oauth1" />

Please help me what should i write in this.

Thank you in adv"

Dhrumil

Dhrumil Shah