开发者

Android callback URL calling oncreate

开发者 https://www.devze.com 2023-01-09 07:12 出处:网络
I am making twitter application in which i open browser for user authentication and i pass call_back URL when launching authentication browser

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 th开发者_开发问答e 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);
  }


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

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


DonT you think it should have been LaunchMode = SingleTop instead of single instance ??

0

精彩评论

暂无评论...
验证码 换一张
取 消