If you remember 2016’s last year’s Google I/O, they introduced Android Instant Apps there. I remember it was Angry Birds already using it and some more apps. Apparently all this time it was one by one companies using it in some closed way. Finally, it’s public and we all can build Instant App right now!
If you haven’t seen those talks, you can basically use your app without installing it. It’s in stable 1.0 release, by the way. But, hell, it is frustrating. In my vision – you have TRY NOW button along with INSTALL in Play Store, by clicking it you should open app right away. There isn’t. And same button should be in browser, when you look for app and there’s INSTALL button, once again, there isn’t one. I think they did want to go that way in the beginning, but changed their mind
So how do you try app without installing it? Currently what they have is this link for browsers
If you see Instant it means this link will open Android Instant app. You can tell by Google Play at the bottom of the screen as a splash screen. I have Android O preview on Nexus 6p and this app hangs on slash screen and most of the apps they showed on I/O aren’t available in Europe. So I couldn’t try Instant apps so much.
It’s weird, last year I saw something like TRY NOW button in a browser for Angry Birds, I remember trying it out without installing, it was super glitchy. Now there’s no such buttons.
And second way to start instant app is by clicking on a link. Since now all your activities have to be available via url’s.
First of all you need to download Android Studio 3.0 preview, if you don’t have it yet. It doesn’t replace your stable version, so don’t worry about loosing it. And from Tools/Android/SDK Manager/SDK Tools install Instant Apps SDK.
There’s isn’t many changes to app structure in general. First is all your activities should be url reachable. Second – you break app down to multiple modules, which they call features. That’s it. There’s two new Gradle plugins: com.android.instantapp and com.android.feature. They go instead of com.android.application for some modules
The best way to start is just by creating new project in Android Studio 3.0 and checking Instant App Support
By the way, Koltin seems to not working currently. I suggest you following this stack question for getting any updates.
As I mentioned above, all your activities should be available via url. You can check this post, that’s super easy to do. Also they added shortcuts for doing this in Android Studio.
What you’ll get in that sample app you’ve created with Android Studio wizard is 4 modules: base, feature (or any that you declared during project creation), instantapp and app. In run configuration you’ll get two modules to choose to test installable or instant app.
instantapp module has just build.gradle with dependency on base and feautre modules, basically same has app module. This means that all code should go to feature modules. Base module is shared across all the feature modules and has resources that all of them share like app icon.
There’s a template for adding new ones
To publish instant app you’ll need to build a different apk and in Play Console there will be different tab for uploading instant app apk.
Great idea, especially for games. Let’s look at the app side. If you don’t have a web site – instant apps is perfect for you. Your app content gets accessible from search and they actually can open it like it’s a web site. But if you have a web site already and great mobile web which is reachable by url’s, I don’t see any reason for implementing instant apps, just a waste of time.
It makes so much sense for games with big apk sizes, if instant perform well of course.
The way your instant apps are hidden I don’t understand. Maybe Google will iterate and push them just like install.
It’s just the beginning, user experience will improve in future for sure. Check official tutorials here. Thanks for reading, don’t forget to subscribe, follow me on Twitter, Facebook, G+ and share with friends!