Android onNewIntent Uri siempre es nulo
En el método onNewIntent () de mi actividad,getIntent().getData();
siempre es nulo Definitivamente va a este método antes de ir aonCreate()
o cualquier otra función del ciclo de vida. Vuelve aquí desde un navegador, no sé por qué.getIntent().getData()
aunque es nulo
Esta actividad inicia el navegador de esta manera.context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(requestToken.getAuthenticationURL())));
y vuelve aqui
@Override
public void onNewIntent(Intent intent){
super.onNewIntent(intent);
Uri uri = getIntent().getData();
if (uri != null && uri.toString().startsWith(TwitterConstants.CALLBACK_URL)) {...}
}
pero uri siempre es nulo.
cosas manifiestas
<activity
android:name="myapp.mypackage.TweetFormActivity"
android:configChanges="orientation|keyboardHidden"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar">
<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="oauth" android:host="myapp"/>
</intent-filter>
</activity>
static final String CALLBACK_URL = "oauth://myapp";
¿que me estoy perdiendo aqui? Gracias