Android (ReactNative) Открытая глубокая ссылка из `adb shell am start` не работает - PullRequest
0 голосов
/ 26 июня 2018

Я хочу установить глубокую ссылку в Android, используя React Native.Я устанавливаю AndroidManifest.xml следующим образом:

<intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
        <action android:name="android.intent.action.DOWNLOAD_COMPLETE"/>
        <!-- Settings for deep link below -->
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="lucmo-client-app" android:host="lucmo-client-app" />
</intent-filter>

Я устанавливаю URL с помощью этой библиотеки: https://github.com/aksonov/react-native-router-flux

Когда я выполняю

adb shell am start -W -a android.intent.action.VIEW -d lucmo-client-app://lucmo-client-app/users/1 com.lucmo_client_app

Он говорит

Starting: Intent { act=android.intent.action.VIEW dat=lucmo-client-app://lucmo-client-app?data=1 pkg=com.lucmo_client_app }

Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=lucmo-client-app://lucmo-client-app?data=1 flg=0x10000000 pkg=com.lucmo_client_app }

С другой стороны, он отлично работает при настройке в Run > Edit Configurations в Android Studio.

enter image description here

Что не такоб этом?

...