Site icon Syrus

New features are available on Android!!

iphone screen showing icons on screen

As engineers, we generally need clients to refresh their applications to the most recent form rapidly. We need everybody to utilize the most recent highlights remembered for the updates. Google informs Android clients at whatever point refreshes are accessible for specific applications. Nonetheless, this is principally for clients who have empowered the auto-update highlight. It is, hence, significant for clients to know when your application has another update accessible.

Presentation

Assume a client has your application introduced on their cell phone. However, you have added new basic highlights or fixed a bug to the application. The main way the client can get to these functionalities is by refreshing the application. A few clients miss the mark on interest or time to open the Google Play store and update their applications. This implies that they will require some investment prior to changing to the most recent adaptation.

To tackle this issue, Google I/O presented an in-application update API. This API cautions clients at whatever point you have another rendition on the Google Play store. The API presents an update UI inside your application to inform clients to refresh to the recently accessible application adaptation. Clients don’t need to open the Google Play store to start the update.

Objective

In this aide, we will find out about Google’s in-application updates and carry out them in our applications. We will examine the two strategies to carry out in-application refreshes: prompt and adaptable.

Quick

The quick update presents a hindering full-screen UI. Whenever a client begins the update, he/she can’t utilize the application until the update is introduced. The application will consequently restart when the update is finished. This strategy is favoured when the update presents basic functionalities.

Adaptable

An adaptable update permits clients to cooperate with the application while the update happens behind the scenes. When the update is downloaded, the application will provoke the client to restart the application. The application will then, at that point, introduce the update and open the application to the frontal area. It is favoured when the update has minor changes that don’t influence the application’s basic functionalities.

Requirements

This guide expects you have earlier information on Android application advancement utilizing Android Studio and Java.

At the hour of composing this aide, the Google Play Core variant was 1.8.3. It is prescribed to have the most recent adaptation. Check for the most recent adaptation here.

Foundation

Setting the in-application update is straightforward. The Google Core API executes every significant usefulness. A client doesn’t need to initiate auto-refreshes in the Google Play store. The API will deal with the update stream in any application that has carried out this in-application update idea.

Prior to taking care of the update type, either adaptable or prompt, you ought to see how the API functions. How about we examine a portion of the vital classes and capacities that assist us with setting off an update stream.

To check on the off chance that there is an update accessible in the Google Play store, we need to make a case of appUpdateManager. It speaks with the AppUpdateInfo object. The item sets off a far off correspondence with the Google Play store. It holds the property results and status of any suitable update. The outcome is an assortment of information for the updated accessibility, for example, the accessible application rendition. The information will then, at that point, be utilized to decide if the API should start the update stream.

AppUpdateInfo has the accompanying techniques:

update availability processes the accompanying:

We pass the accompanying boundaries to startUpdateFlowForResult to begin the update stream UI:

Executing adaptable update stream

This stream doesn’t obstruct a client from connecting with the application. At the point when the update is free, the client downloads the update APK, which happens behind the scenes. When the download is finished, the client will be provoked to introduce the recently downloaded application to welcome the new reports ready.

Exit mobile version