Android Instant App

Have you ever thought about the idea to make people use your app instantly, without open the your app listing on Google Play Store and make them wonder if they should install it or not.

That idea is called ‘Instant App’ which developed by Google.
Android Instant Apps allows Android users to run your apps instantly, without installation,

Instant App is a good idea if you want to let people try part of your app and if they do like it they can download it and enjoy the app as is with its full features and screens.

Or if you want try your app for a single purpose, pay for a parking ticket for example.
Users can get to your app from any URL—including search, social media, messaging, and other deep links—without needing to install your app first.
And if you wonder how the user experience would be, this is not an issue at all, because Instant Apps runs natively and smooth.

As you read previously, Instant app runs in response to launching a URL,
So how it works exactly?

When Google Play receives a request for a URL that matches an instant app, it sends the necessary code files to the Android device that sent the request. The device then runs the app.

The URL which launches instant app must be using HTTPS, Instant apps does not support HTTP.
Each activity launches by a different route, keep reading, it will be much clear.

To create an instant app you need to following:

  • Android Studio version 3.0 or later
  • Android SDK Build Tools 26+
  • Android SDK Tools 25+
  • Android SDK platform O
  • Latest Android Support Library
  • Latest Android Repository

Android Instant Apps uses the runtime permissions model that was introduced in Android 6.0 (API level 23).
Instant app also need to break up the app into smaller modules and refactor them into feature modules.
When making an APK for instant app, the build output are Instant App APKs that contain one or more feature APKs.

Each feature APK is built from a feature module in your project and can be downloaded on demand by the user and launched as an instant app.

Every instant app must have one base feature APK, which includes all the configuration of the app, and the other modules kind of inherit the configurations from the base feature.

Instant App APK

As mentioned, your URL must be using HTTPS to launch your app, If you don’t have an HTTPS domain, I think that the best and easiest solution to get one is by Firebase hosting service.

Firebase hosting service provides hosting with a HTTPS domain which exactly what we to make instant app launch.When you make a new project on Android Studio make sure you enabling ‘include Android Instant App support’ checkbox.

In the configure activity screen you need to provide the URL host(which must be HTTPS), Instant app URL Route, which launch the activity you want in the next input field (Activity name)

Configure the activity with the App URL and URL route for the instant app.

 

After finish all the configurations you need to defining entry points for your app
You need to use URL entry points or deep links to launch instant app from a URL,
In the manifest file you need to configure it like the following example:

a snippet from the manifest file that defines an entry-point activity and default URL for an instant app.

* If you wonder why we include HTTP although that All the network traffic from inside instant apps must use HTTPS. this is because that all declared intent filters in your instant app must support both HTTPS and HTTP protocols.

There is an App Links Assistant which can help you configure the entry point and the URL’s in your app.

Part 3 in the App Links Assistant, associate the website (From firebase for example) by generating a digital asset links file which is a json file called ‘assetlinks.json’.
You need to upload that file to your website in a folder named ‘.well-known’ .

for example: https://example.com/.well-known/assetlinks.json
(if you trying to make the .well-known folder and rejected because its name starts with dot,
Try to make it that folder in the terminal by the command ‘mkdir .well-known’ on both Windows or Mac operating systems, and it might be hidden after creating it.

* Try to add Firebase Dynamic Links, which much recommended when making instant apps to guarantee that clicks on your links always take users to your instant app, and to track statistics on link events.

You can generate the assetlinks.json file for dubug and release modes.

After uploading the file to your website, click on ‘Link and Verify’ button to test it.
You can test it also on ‘https://developers.google.com/digital-asset-links/tools/generator’
by providing the hosting site domain, app package name and the app package fingerprint that can be found in the assetlinks.json file.

Step 4 in the App links assistant is to make sure that the corresponding route launches the activity you want and test it on the device or emulator.
If everything is verified and tested successfully you can build an APK for the base App and the instant app.

When selecting Generate Signed APK, you will be asked to choose the module,
one for the app itself and the other for the instant app.
Android Studio will create a zip file with the APK of your modules when trying to generate a signed APK for instant app.
In Google Play Developer Console, upload the app APK and then, in the Instant app section, upload the zip file.

After Google approve the app, check the instant app by sharing the URL (with Google Allo or WhatsApp for example) with the route as the entry point which launches the activity you configured in the Manifest file.

I know that lots of things must be done to make an Instant App, but in the end of it, it worth all the effort.

26 thoughts on “Android Instant App”

  1. Hey all, only notice your own website thru Yahoo and google, determined it’s truly informative. I’m going to be aware intended for the city facebook marketing agency. My business is gracious in case you continue this specific in future. Some people will likely be reaped the benefit from the composing. Cheers!

    Reply

  2. Good post. I had been examining continuously this specific weblog and I’m prompted! Invaluable information specially the closing part 🙂 We maintain similarly info considerably website designer. I became in search of this unique facts for the while. Thanks a lot and also connected with good luck.

    Reply

  3. Hi, You must have done a fantastic job. I will undoubtedly stumbleupon that for the aspect advise to help my girlfriends. I’m certain they will be took advantage of this web site.

    Reply

  4. I just like the valuable info you supply on your articles.
    I will bookmark your weblog and take a look at once more right here regularly.
    I am quite certain I will learn many new stuff proper here!
    Good luck for the following!

    Reply

  5. What’s up, this weekend is good in support of me, for the reason that this
    time i am reading this wonderful educational paragraph
    here at my residence.

    Reply

  6. Hi there, I found your website by means of Google while looking
    for a related subject, your website came up, it appears to be like good.
    I’ve bookmarked it in my google bookmarks.

    Hello there, just changed into aware of your blog through Google, and located that it is really informative.
    I am going to be careful for brussels. I’ll appreciate in the event you proceed this in future.
    Many people will probably be benefited out of your writing.
    Cheers!

    Reply

  7. Keep on working, great job!

    Reply

  8. Wow, that’s what I was exploring for, what a information! present here at this weblog,
    thanks admin of this site.

    Reply

  9. I’m curious to find out what blog system you have been working with?
    I’m having some small security problems with my latest site and I’d like to find something more safeguarded.
    Do you have any recommendations?

    Reply

  10. I’m not certain where you are getting your info, but great topic.
    I must spend a while studying more or figuring out more.
    Thank you for excellent info I was looking for this info for my mission.

    Reply

  11. I am sure this paragraph has touched all the internet viewers,
    its really really fastidious paragraph on building up new weblog.

    Reply

  12. I always emailed this weblog post page to all my associates, as if
    like to read it then my contacts will too.

    Reply

  13. You ought to take part in a contest for one of the best websites on the web.
    I will highly recommend this site!

    Reply

  14. Good post. I’m facing many of these issues as well..

    Reply

  15. Hi, just wanted to tell you, I liked this blog post. It was practical.
    Keep on posting!

    Reply

  16. Hi! I’ve been reading your weblog for a long time now and finally got the bravery to go ahead and give
    you a shout out from New Caney Tx! Just wanted to mention keep up the fantastic job!

    Reply

  17. I’ve been exploring for a little for any high-quality articles or blog posts
    on this sort of area . Exploring in Yahoo I finally stumbled upon this site.

    Reading this information So i am satisfied to express that I have an incredibly just
    right uncanny feeling I found out exactly what I needed. I most undoubtedly will make certain to don?t forget this web site and give it a look on a continuing basis.

    Reply

  18. Normally I do not learn post on blogs, however I would like to say that this write-up very pressured
    me to try and do so! Your writing taste has been surprised me.
    https://rokucomlinks.org

    Reply

  19. Hi, always i used to check website posts
    here early in the break of day, for the reason that i enjoy to
    find out more and more.
    https://www.desiretechsupport.com/activate-espn-on-roku/

    Reply

  20. Hey! Do you know if they make any plugins to assist with
    SEO? I’m trying to get my blog to rank for some targeted keywords
    but I’m not seeing very good results. If you know
    of any please share. Appreciate it!

    Reply

  21. This is one awesome blog post.Really thank you! Really Cool.

    Reply

  22. Hey! I just wanted to ask if you ever have any issues with hackers?
    My last blog (wordpress) was hacked and I ended up losing a few months of hard work due
    to no back up. Do you have any solutions to protect
    against hackers?

    Reply

  23. Kitap Satan Siteler Kapıda Ödeme En Çok Okunan Romanlar
    2015

    Reply

  24. Pi Kitap Fiyatı Türkiye De En Çok Satan Kitaplar

    Reply

  25. I do believe all the ideas you have offered on your post.

    They’re very convincing and can certainly work. Nonetheless, the posts are very short for beginners.
    May just you please prolong them a bit from subsequent time?

    Thank you for the post.

    Reply

  26. Hmm is anyone else having problems with the images
    on this blog loading? I’m trying to determine if its a problem on my end or if it’s the blog.
    Any feed-back would be greatly appreciated.

    Reply

Leave a Reply

Your email address will not be published.