currently i'm working on React Native Android Project, I want to use deep link on some page.But somehow the link always redirect to login page instead of signup page.
already tried adb shell am start -W -a android.intent.action.VIEW -d "myapp://mobile/signup"
i am afraid incorrect in nested navigation.
or should I put path on all screen? because i dont put it all
"react-navigation": "^3.11.1""react-native": "0.60.4"
router.js
const prefix = 'myapp://'<Navigation ref={(comp) => (this.navigator = comp)} uriPrefix={prefix} />
navigation/index.js
const LoginStack = createStackNavigator( { LoginScreen: { screen: LoginScreen }, SignUpScreen: { screen: SignUpScreen, path: 'signup', }, ForgotPasswordScreen: { screen: ForgotPasswordScreen }, }, { navigationOptions: { tabBarVisible: false }, }, { mode: "modal", header: null, transitionConfig: () => TransitionConfig, });const AppNavigator = createBottomTabNavigator( { Default: { screen: HomeStack, navigationOptions: { tabBarIcon: ({ tintColor }) => (<TabBarIcon icon={Images.Icon} tintColor={tintColor} /> ), }, }, LoginStack: { screen: LoginStack, path: 'login', }, }, { initialRouteName: 'Default', tabBarComponent: TabBar, tabBarPosition: "bottom", swipeEnabled: false, animationEnabled: false, tabBarOptions: { showIcon: true, showLabel: true, activeTintColor: Color.tabbarTint, inactiveTintColor: Color.tabbarColor, }, lazy: true, navigationOptions: { gestureDirection: I18nManager.isRTL ? "inverted" : "default", }, });const AuthNavigator = createStackNavigator( { LoginScreen: { screen: LoginScreen }, SignUpScreen: { screen: SignUpScreen, path: 'signup', }, }, { mode: "modal", header: null, transitionConfig: () => TransitionConfig, });export default createAppContainer( Config.Login.RequiredLogin ? createSwitchNavigator( { AuthLoading: AuthLoadingScreen, App: AppNavigator, Auth: AuthNavigator, }, { initialRouteName: "AuthLoading", } ) : AppNavigator);
AndroidManifest.xml
<activity android:name=".MainActivity" android:label="@string/app_name" android:exported="true" android:launchMode="singleTask" android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:windowSoftInputMode="adjustResize"><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" /></intent-filter><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="mobile" /></intent-filter></activity>
any help would be appreciated :)