0

I have 2 applications called AppOne and Apptwo. AppOne has only one activity and is an Instant App. I have the url for the instant app. I have deployed it to Play Store for Internal Testing. In my Apptwo, I want to open my instant app through url. I tried doing this many times but I succeeded only once in opening the instant app once even though AppOne was not installed on my device, most of the times it shows me the webpage of my website.

When I installed AppOne on my device, Apptwo successfully opens AppOne, but now AppOne is an installed app which I don't want. Do I need to provide Firebase Dyanmic Link so that my Apptwo always opens AppOne, right now my I am just linking my website's URL to my instant app. And when I deployed my instant app to Play Store it is showing me the following message, even though my My AppOne's apk is live

Changes to your Instant App's testing tracks
Your instant app's pre-release and development tracks will soon be merged into your installed app's alpha and internal test tracks respectively. 
IMPORTANT:
Your installed app's alpha and internal test testers are now your instant app's pre-release and development testers respectively.
You will only be able to edit and manage your instant app's testers through your installed app's testing tracks.
Your instant app testers will soon be removed. Any testers for your instant app can only be managed through your installed app's testing tracks.
Please go to the corresponding installed app testing track to make changes

When I delete my Google Play services for instant app, and again download it, then for the first attempt only my Apptwo opens my instant app, then after that it keeps opening my webpage of my website. I have to again delete google play services for instant app and download it, to see my instant app.

halfer
  • 19,824
  • 17
  • 99
  • 186
BraveEvidence
  • 53
  • 11
  • 45
  • 119
  • I have no issues launching an IA from a different app. Got a sample code of how you launch it? Similar to https://github.com/googlesamples/android-instant-apps/blob/master/hello-feature-module/features/hello/src/main/java/com/instantappsamples/feature/hello/HelloActivity.java ? – TWL Apr 23 '18 at 23:24
  • Possible duplicate of [Start instant app from another installable App](https://stackoverflow.com/questions/49700306/start-instant-app-from-another-installable-app) – TWL Apr 23 '18 at 23:48
  • @TWL This works only when you have instant app in your device already before calling from Apptwo. What if i don't have instant app and want to open directly from Apptwo – BraveEvidence Apr 24 '18 at 08:19
  • This code worked for me still, when the IA was not on my device, on both pre-O and O+ devices. – TWL Apr 24 '18 at 17:10
  • @TWL I have only uploaded my instant app to playstore. I have not uploaded my AppTwo to playstore. Do i need to upload my AppTwo to playstore for it to work? – BraveEvidence Apr 25 '18 at 04:27
  • No, AppTwo does not have to be published. I tested a sample built directly from studio. – TWL Apr 25 '18 at 15:31

1 Answers1

0

The Android Documentation specifies that Instant App feature is available from API 21 , but actually it isn't. The settings to enable Instant App is not even available in MarshMallow(API 23). It is only available from Nougat. I know there is an hack to enable the instant app in API 21,22 and 23(not recommended).

I somewhat was successful to open my instant app from another installed app (only if android version is Nougat or higher) without separately opening instant app first. I put both the apk of instant app and installed app in Production of PlayStore. Then i have to enable instant app feature from Settings (available only from Nougat), and then install AppTwo. If instant app is not enabled, it opens my web page.

I think google should by default enable the instant app feature. I don't know if we can programmatically enable instant app from Settings app of a user's device. I am accepting my answer for the time being. Hope somebody figures it out and let me know.

halfer
  • 19,824
  • 17
  • 99
  • 186
BraveEvidence
  • 53
  • 11
  • 45
  • 119
  • Instant apps is available on most devices (not all) as low as API 21. On the older devices, the IA settings is not in the default "Settings", but actually in a separate "Google Settings". What device are you using? – TWL Apr 25 '18 at 15:31
  • @TWL MicroMax API 21 – BraveEvidence Apr 25 '18 at 16:25
  • @TWL Can you share link of your instant app. I will create an app which has an Intent of your Instant App url and check. – BraveEvidence Apr 25 '18 at 16:29
  • I'm not sure about MicroMax, but I have a LG on 5.0 that has instant apps. – TWL Apr 25 '18 at 19:13
  • Make sure you have your Chrome and Play Services up-to-date, restart your phone, and if it has support for IA, it'll download that component and the options will show up in Google Settings. Otherwise, I'm afraid your phone doesn't support IA. – TWL Apr 25 '18 at 19:14