Search code examples
androidreact-nativegoogle-chromedeep-linking

React Native Android deeplinking in google chrome browser


Hi everyone i have strange deeplinking behavior in android , i have created route and give them path, uriPrefix and every other preparation. so i tested it via adb

>adb shell am start -W -a android.intent.action.VIEW -d "dapurq://auth/register" com.dapurq

and it works perfectly with this output

Starting: Intent { act=android.intent.action.VIEW dat=dapurq://auth/register pkg=com.dapurq }
Warning: Activity not started, intent has been delivered to currently running top-most instance.
Status: ok
LaunchState: UNKNOWN (0)
Activity: com.dapurq/.MainActivity
TotalTime: 0
WaitTime: 5
Complete

but when i type in my emulator browser (google chrome) it doesnt work, instead chrome searching the address enter image description here


Solution

  • this is the answer, i feel ashamed of my lack of docs reading

    so we can't access deeplinking directly, it should've wrapped in intent

    <a href="intent://beli/userprofile/someurl #Intent;scheme=dapurq;package=com.package;S.browser_fallback_url=https%3A%2F%2Fdapurq.id%2Fnoapps;end"> Deelink</a>