Android oncreate callback url

I am making a twitter application in which I open a browser for user authentication and pass the call_back URL when the authentication browser starts

the problem is after authentication, it again calls the oncreate of the TWitterShare class instead of calling the NewIntent method, why is this? my other class works fine, I can't find the difference in any idea looking at the next ocde, why does it call 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);
  }
+3
source share
2 answers

Shame on me and all of you guys a little thing to fix

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

+4

DonT , LaunchMode = SingleTop ?

0

Source: https://habr.com/ru/post/1757294/


All Articles