How to set up smartphones and PCs. Informational portal
  • home
  • In contact with
  • New technology from Google "Instant apps" - what it is and how to install it. Instant apps: what is it, how to connect and use

New technology from Google "Instant apps" - what it is and how to install it. Instant apps: what is it, how to connect and use

The line between websites and apps has been heavily blurred over the past ten years, but it hasn't been erased. On the contrary, with the rise of mobile phones, applications have returned and are not going anywhere. Instant Apps technology is an approach to the same problem from a different angle. What if we replaced websites with real apps? The consequences could change the internet forever and have serious side effects.

At Google I/O 2016, which took place in mid-May, a lot of interesting things were shown - from the quite expected new version of Android, about the security features of which you can read in Zhenya Zobnin's column, to the app store for virtual reality. But it may turn out that the most important announcement is not Android N, not virtual reality, and not Google Home, but something called Instant Apps.

Here is a basic example of how to use Instant Apps. You use your Android phone or tablet to search for a product on the Internet and click on the link in the search results. And instead of the store's website, your device will download a certain minimum version of the application, which will contain only information about this product and the "Buy" button.

It would seem that there is no fundamental difference compared to sites (the author of the xkcd webcomic has already managed to make fun of this). But jokes are jokes, but there are still differences, and very important ones.

First, you can immediately make a purchase using the credit card information already in your phone. Secondly, with your permission, the application can access the phone's sensors and the information stored in it. Thirdly, the application may have a more responsive interface than the site.

Technically, this is implemented as follows: the developer builds his program so that it has an easily separable part that can be downloaded separately. It is not necessary to create a new code branch, the main thing is to call the Instant Apps programming interfaces in the right place. The app is submitted to Google Play and the rest is Google magic. When the search engine decides that an application can be shown instead of a website, it will request it from Google Play and show it to the user.

At the same time, it is not even a fact that Instant Apps will take longer to load than the site and spend more traffic. Many modern sites suffer from the problem of obesity, and it is not uncommon to find pages that suck ten megabytes from the Internet. This would be enough for a whole application, so if part of it takes, say, one megabyte, then this is unlikely to scare anyone today.

Visitors to Google I/O applauded this announcement for good reason. It seems to solve a lot of problems and opens up great opportunities. The trouble with apps is that you often need to immediately use some program and for this you need to download it, and it may take too much to download over a cellular network. Moreover, the next time it is needed may come, for example, in a month or not at all.

Instant loading of only the most necessary part of the application will allow you to do without installation and not to clog your phone. This is convenient when, say, you want to order something delivered or, for example, you want to rent a bike while walking around another city.


It would seem that Instant Apps has solid pluses and no minuses. Users of computers and all sorts of iPhones will see a regular site, and Android will download its own piece of the program from Google Play instead. Any publication, any online store, as well as many real stores, cafes, museums, exhibitions, whatever - even ordinary objects that computers are increasingly embedded in now will be useful for "instant applications".

But let me remind you of one important historical example. In the late eighties, when Microsoft Word was one of many competing word processors, no one complained that its standard was closed. On the contrary, it was the norm - each program had its own file standard.

But when the popularity of Windows and Word made its format virtually the only standard for text documents, there was already talk that it would be nice to open it to everyone. For many years this was a very acute problem, and so far it has not been fully resolved.

What if the popularity of Android and the Google search engine make Instant Apps the new standard for websites? Instead of a web where you can look into the code of any page, we will get a web consisting of Java bytecode.

You can, of course, laugh and say that this is an old and unfulfilled dream of Sun Microsystems engineers. But they imagined that Java programs would run on any computer with any architecture, while Google turns out that in order to run an "instant app" you need to have a compatible device. And by the way, no matter which Android is not suitable, because access to the store is only available on phones with a Google-licensed version of the system. Here's to you and freedom with openness!

By the way, it is potentially not only about mobile phones. As you know, Chrome OS is actively building support for Android applications, and there is no reason not to add Instant Apps. Chromebooks meanwhile are steadily gaining popularity. In the US, thanks to interest from educational institutions, they are already outselling Macs (desktops and laptops), according to IDC.

App stores have been stealing bread from websites for years, so the advent of Instant Apps can hardly be considered a sudden event. By the way, two other new technologies come to mind - Google's Accelerated Mobile Pages (AMP) and Facebook Instant Articles. Both are close in spirit to Instant Apps and aim to better accommodate text content for phones.

Of course, it's too early to panic and scream that Google is killing the web. It's hard to argue with the fact that Instant Apps will be of great use, and fighting progress is not the best idea. Mobile phones have not yet finished changing the technological landscape, and Instant Apps are not the latest manifestation of this process. The only pity is that changes often lead to increased closeness and fragmentation.


And, of course, no one knows whether this technology will win or not, how widespread it will eventually be, and what Google's next steps will turn out to be. Here's another interesting question - how will Apple react? Will a direct analogue appear in iOS, or, perhaps, Cupertino will come up with a radically different approach?

And finally - one more historical example. Remember Flash? Its creators wanted to first introduce their super-advanced technology into websites (and they succeeded quite well), and then have it replace the web (and now it didn’t work out). And after some time, Flash has become a hated holey garbage that everyone is in a hurry to get rid of as soon as possible. Instant Apps in Google, at least, will be able to turn off at any time.

Mobile technologies do not stand still, constantly offering users of portable devices new ways to interact with content. A prime example of this is a recent technology from Google called Instant Apps, which is designed to make a small revolution in the framework. According to the creators of this innovative feature, its mass implementation will finally erase the boundary between programs and websites. In this article, we will talk about the recently introduced Instant Apps, finding out what it is, what problems it solves, and how you can take advantage of such an innovation.

What is Instant Apps?

Will be useful

To date, there are three ways to gain access to network content that is located on a specific Internet resource. First of all, this is a full-format version of the site, which has maximum functionality and is designed to be viewed on a desktop computer or laptop. Secondly, this is a mobile display of a web page, adapted for use on portable devices such as smartphones and tablets. The third type of interaction is carried out thanks to various utilities that help satisfy the basic needs of users of online services.

What exactly is another innovation called Instant Apps? Translated from English, this phrase means "instant applications", which perfectly reflects the essence of the work of this function. As a rule, before using the program content the owner of a mobile gadget must fully download the corresponding file from the Google store. Developments built on the principle of Instant Apps are not an indivisible system, but consist of a large number of independent modules. Such autonomous blocks are not downloaded all together, but are quickly loaded as needed.

Main advantages

What do these new Instant Apps give? According to experts from Google, this update, available for the Android OS, can completely change the modern approach to working with various online services, significantly increasing the convenience and speed of downloading content. As a rule, the mobile version of the site does not have sufficient flexibility and functionality that specialized utilities can boast of. But it takes time and traffic to download them. In general, Instant Apps technology provides the following benefits:

  • high speed of work, as well as ease of use;
  • significant savings in the internal memory of the gadget;
  • the absence of any difficulties associated with installation;
  • a wide range of supported mobile devices.

Now, thanks to Instant Apps technology, you can freely navigate to any program content without any delay, as it is automatically downloaded in separate functional blocks. Depending on whether you want to purchase a product, watch a video, or play a small game on the site, a separate fragment of a full-fledged mobile utility will be downloaded, which does an excellent job. From a visual point of view, all this looks like ordinary software downloaded from the store.

Installing programs

You can get acquainted with all the features of the new function from Google using the official online store for Android. Any user of this platform with a supported version of the OS is now able to download a trial module of any utility marked "Instant" in order to test it on their device. To do this, you need to perform the following sequence of simple steps:

  • Open the application's download page in the Google Play store.
  • Click on the "Try" button, which is located next to "Install".
  • In the browser launched after that, select the "Continue" option.
  • Wait for the final download of all necessary files.

note

To get the full version of the content, you should return to the store and select the "Install" option. After that, an icon will appear on the desktop of your mobile device, designed for permanent access to the software product.

Connecting Instant Apps

Will you use this technology?

A technology called Google Play services for Instant Apps works on absolutely all modern smartphones and tablets that have Android 6.0 and higher. If you are the owner of older versions of the system, your device will need . By default, the service features are in working state, otherwise they can be enabled fairly quickly by following these steps:


After that, you will have access to the capabilities of the Instant Apps technology, which will allow you to easily use specialized network utilities at maximum speed and without clogging the internal memory of the gadget. The transition to an offline module supported by the online service will now be carried out automatically, which will allow you to work with content without being distracted by extraneous download details.

conclusions

Having figured out how you can use Instant Apps and what it gives us, it is necessary to draw some conclusions. The widespread introduction of this feature provides a lot of benefits not only to ordinary users, but also to developers of mobile utilities who are trying to sell their services to as many people as possible. Thanks to the modularity of the created products, the convenience and speed of working with program content is increased, and . Perhaps in the near future this technology will be further developed, which will lead to a significant increase in the popularity of Android.

Hello. Today I want to talk about a relatively new functionality of Google - Google Play Services for Instant Apps. What is this “feature”, is it needed in the phone, how to disable / remove it correctly, is there a danger of catching a virus? There are many questions, but all of them will be considered in this review. Let's get started!

Briefly describe the purpose of the technology, it is necessary to simplify the process of paying for services and goods on the Internet, without the need to install additional software on your gadget. Let's figure it out!

What is Instant Apps?

If we translate this phrase literally, we get the expression - " instant launch apps". We are dealing with the functionality of the Android operating system, which allows you to view content from Google Play before you install it in the device's memory. Beforehand, a small file with an overview of the functionality of the program or service is downloaded to the smartphone, you carefully review the content and decide whether to download the full version of the software or not. Thus, you save time and “disk” space without clogging it with programs that may later turn out to be useless.

BUT, there is a limitation! Not all applications support this mode. Its implementation and implementation fall on the shoulders of developers. If they create an adaptation of their utility with support for the Google Play Services for Instant Apps application, then on the download page in the official Google store you will see a special button " try". At the moment, the list is not too large, but foreign companies are actively implementing the option in their software (Buzzfeed, Periscope, Wish).

Consider an example with Buzzfeed (news aggregator).

  • We follow the link and see the button we need, which allows us to test the program before installation.

  • After clicking, the built-in browser is launched with the name and notification about the opening of the application without installation. You can read the terms of the agreement or immediately select " Continue" (proceed).

  • After a few seconds, a preliminary version will load, explore the capabilities of the software. If you like it, then click at the top Install» to download to memory.

How to connect?

Not on all phone models, the functionality is available by default (it is present almost everywhere, starting from Android 6.0.

Google Play Services for Instant Apps cannot be downloaded from official sources. If you find similar sites on the network, bypass them, otherwise you will pick up a virus. The required option is built into Android and cannot be installed separately (except by device firmware).

And to enable the preview feature, you should:

  • Go to " Settings» device;
  • Open section " Google» - « Instant Apps» and activate the switch:

A list of software that you have already watched earlier will also be displayed here.

Troubleshooting

Most often, users complain that Instant Apps are loaded without the permission of the owner of the phone, the program itself starts and automatically updates - as if it lives its own life. Unfortunately, Google considers this behavior to be quite normal and natural. Therefore, you must either accept or disable the option (see instructions above).

In fact, IA is the next step in the development of the Internet. It's just that we are not used to this yet, it causes alienation in us. And very soon, in order to make purchases in online stores, we will not need to go to the site, search for the right product for a long time and go through several steps of registration, placing an order. It will be enough to use Google Search to find a product, and then a page with a description and a purchase button from the corresponding store will immediately be loaded through Instant Apps.

Instant Apps is an assistant and provides recommendations according to user interests, which some users perceive as intrusive advertising. Hence the dislike. If you do not need it, just go to the settings, category " Google” and disable instant-run apps.

So we figured out Google Play Services for Instant Apps what it is, how to activate it.



In this article, we will look at what an Instant App is, why is it needed and how to create such an application?

Back at DroidCon last year, I heard about this topic. This year we also talked about it. Finally I got around to looking in more detail. In this article I will tell you what I managed to understand. There will be practically no code here, only a superficial analysis. And at the end, some useful links for further study.

Example

Let's see an example right away. There is such a video hosting - Vimeo. And they have their own Android application on the market.

If you google, for example, "vimeo video", then Google will show several videos in the results, clicking on which you can go to the Vimeo site. Those. the browser will open a link like https://vimeo.com/236370796. But if you do this on an Android smartphone that has the Vimeo app installed, then it will open instead of the site. The system sees that there is an application that can open such a link and launches it.

If the Vimeo application is not installed, then its Instant App version may open.

This is an application that we have not even explicitly installed. The system itself downloaded and installed it, and opened the video in it. (I don't know why the recorder didn't record the video that plays at the top of the screen, but it's there). Please also note that this application has a button to proceed to install the full version from the market.

If your Instant App does not start, then make sure that it is enabled in the system settings: Settings -> Google -> Instant App. If you do not have an Instant App item in your settings, then your device does not support it.

Those. the system intercepted the link, determined that there was an Instant App application for it, downloaded it and launched it. Link plays a very important role in this technology. Essentially, a URL is an entry point to an application. A little later I will tell you how this binding is implemented.

And this is how the full version of the Vimeo application installed from the market looks like.

It can be seen that the screens of both versions are very similar, but the Instant App version has limited functionality. Instant App is a light version of the main application. As we have seen, it can be quickly loaded and displayed by clicking on the link.

Why you need an Instant App

Why might this be needed? The most obvious answer is to get more installs for your app. The user finds something on Google (or just gets a link in a messenger, mail, etc.), clicks on the link and your Instant App opens. It allows the user to see the approximate functionality and encourages the user to install the full version. This way you will get a new user. Those. Instant App is a classic app demo that helps the user make the decision to install the full version.

How to create an Instant App

Let's figure out where this Instant App version came from and how to create it.

It was created in the same project as the main application. But in order to be able to create a lightweight and limited version, it is necessary to divide the code of the main application into modules.

What modules are we talking about? About the ones we work with in Android Studio. By default, we only create the app module. If we are working on Clean Architecture, then we usually create a few more modules. And if we are going to create an Instant App application, then we put individual features of the application into modules.

In the Vimeo example, such a feature is the video viewing screen. Those. the application has some kind of Activity that is responsible for this screen. It has been moved to a separate module. Let's call this module - videoplay. In this module, in addition to Actiivty, we take out the classes used by it - adapters, presenters, custom views, etc. there should be classes that only this Activity needs to work and no one else.

For common repositories and other classes that will be used in modules, there is a separate module called base.

Each feature module has a dependency on the base module:

Dependencies ( implementation project(":base") ... )

However, this does not prevent the base module from being a feature module. It can also contain an Activity.

As a result, your project consists of one base module and several feature modules. From all this, we can assemble two types of application.

The first one is a regular full-fledged APK that will include all of your feature modules.

The second is a limited Instant App that will include the base module and the feature modules that you want to see in this application.

To enable us to build two different applications from the same code, the Instant App project has two build modules: installed and instant.

installed will build a full-fledged application for us, and instant will build an Instant App version.

These modules have gradle files in which we write feature modules that will be used when building the application.

Dependencies ( implementation project(":base") implementation project(":feature1") implementation project(":feature2") )

Accordingly, in the gradle file of the installed module, we usually specify all feature modules in order to get an APK with full functionality. And in the instant gradle file, we specify only those features-modules that we want to see in the Instant App application.

The installed module will build an APK that will use the modules as libraries. And the instant module will make a separate APK from each module and pack all these APKs into one ZIP.

Market

Which of these two versions of the application should be uploaded to the market?

A full APK must be there. But Instant App - according to your desire. If you need it, then create and upload.

How to programmatically determine the version

Because both versions of the application use the same code, then in this code it may be necessary to check which version we are currently in. You can use the isInstantApp method for this.

activity = module

And what, now you need to take out each Activity in a separate module?

No need. Move only those screens that you want to see in the Instant App into separate feature modules. And you can leave the rest of the code in one separate feature module, which simply will not be included in the Instant App. Do not forget to put the classes that will be needed for the feature modules to work in the base module.

URL

I already mentioned that the URL is the entry point to the Activity.

Each feature module must contain at least one Activity (or more). And for this, the Activity must be configured with an IntentFilter to a specific URL.

The system finds that there is an Instant App application in the market, which has a feature module that can open such links.

A little higher, I wrote that the Instant App application is a ZIP, in which all feature modules and the base module are collected in the form of separate APKs. In the case of Vimeo, for example, these could be, for example, the videoplay.apk files (created from the videoplay feature module) and base.apk (created from the base module). And in videoplay.apk there is an Activity that has an IntentFilter configured on vimeo.com links.

The system downloads videoplay.apk to the device and starts. Along with it, she also downloads base.apk. Those. when a feature APK file is loaded for the first time from the Instant App, base.apk is always loaded along with it. Because all features are dependent on base. From this, by the way, one limitation follows. The total size of any feature APK file and base.apk must not exceed 4 megabytes. Those. in our case, the total size of the videoplay.apk and base.apk files should not exceed 4 MB. This is to ensure that Instant Apps are as light and fast loading as possible.

It is important to understand here that even if the Instant App application contains any other feature APK files, the system will only load videoplay.apk (+ base.apk). Because at the moment, only this file is needed to process the clicked link.

But what if the screen in videoplay.apk provides an option to go to some other screen, like the comments screen? In this case, the transition should be programmatically implemented not with the Intent that calls the Activity, but with the Intent that calls the link. For example, it could be a link like https://vimeo.com/236370796/comments.

Let's assume that the project has a videocomments feature module that contains an Activity with an IntentFilter configured for such links. And this feature module was listed in the instant module. In this case, the system will find that the Instant App application also has a videocomments.apk file, which has an Activity configured for this type of links. The system will download and run videocomments.apk. The base.apk file in this case will no longer be loaded, because. it has been uploaded before.

try now

If the market has an Instant App version of the application, then the user sees the Try now button.

By pressing this button, the same thing happens as by clicking on the link. The system will download one of the feature APK along with base.apk and run it.

Which module will be launched can be defined in the manifest. The APK that contains the main Activity will be found. Those. Activity with default filter:

Or it is possible to specify a link in the manifest:

It will be called by clicking on Try now and then the feature APK corresponding to this link will be downloaded and launched.

useful links

Top Related Articles