https://example.com/public/change_phone?email_recovery_code=F08fjfU39Ea6RSlDzM8ZZJFVwyjAE
<activity android:name=".view.activity.sign_in_new_number.SignInNewNumberActivity">
<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="https"
android:host="example.com"
android:pathPrefix="/public/change_phone"/>
</intent-filter>
</activity>
我使用了上述清单设置,但不适用于Gmail应用程序,URL不能重定向我的应用程序,只需在Gmail应用程序中打开链接即可
答案 0 :(得分:-1)
如果启动屏幕是应用程序中的第一个屏幕。那么请在启动活动的onCreate()上使用它:
首先获取通过深度链接获取的网址
Intent intent = getIntent();
Uri data = intent.getData();
if (!isTaskRoot()) {//this will resume your app from last loaded screen if you pressed home button earlier
Log.e("splashfin", "hello");
if (data != null) {
//open that activity through your url or do what ever you want
}else{}
}else{
if(data!=null){
//open that activity through your url or do what ever you want
}
}