Reputation: 3748
I created a instant app for which I created app links.
I hosted assetlinks.json
over valid website.
My website name is as below:
https://instantappsbase.firebaseapp.com
assetlinks.json
is hosted over the above website through generated digital signature of debug version:
https://instantappsbase.firebaseapp.com/.well-known/assetlinks.json
I added a feature which launches an activity with a message "Hello World
" .
I tried to call that Activity as below as configured in "URL-mapping editor
":
https://instantappsbase.firebaseapp.com/hi
I tried the above URL in browser of my mobile and emulator , its not working.
When I try to call through intent as below:
Intent intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("https://instantappsbase.firebaseapp.com/hi"));<br>
intent.setPackage(getPackageName());
intent.addCategory(Intent.CATEGORY_BROWSABLE);
startActivity(intent);
It's working fine.
But when I try to open it through browser its not working. It displays "PageNotfound
" error.
Is there a way in which can we get this working without uploading our installed app and instant app over google play store.
or did I miss some thing in this flow.?
Can anyone help me regarding this issue?
Thanks in Advance.
Upvotes: 1
Views: 2490
Reputation: 17922
But when I try to open it through browser its not working.
When you type the URL in the browser's address bar, the browser will handle opening the content.
What you can do to launch your instant app:
launch it via the command line like this:
adb shell am start -a android.intent.action.VIEW \
-d "https://instantappsbase.firebaseapp.com/hi"
Either of these ways only work if the instant app is deployed to the Play Store or you have a version of the instant app deployed to your device locally.
Upvotes: 3