Build Your Android App with Android’s Assist API

0
Shares
Build Your Android App with Android’s Assist API
3 (60%) 1 vote

assist-api

The Android Assist API

Android 6.0 Marshmallow brings forth a brand new way in which the user engagement can increase with the apps. This way suggests making an app with through the assistant API.

Users summon the assistant with a long-press on the Home button or by saying the keyphrase. In response to the long-press, the system opens a top-level window that displays contextually relevant actions for the current activity. These potential actions might include deep links to other apps on the device.

This provides the third party developers with a chance to use an assistant (J.A.R.V.I.S.!?) to interact with applications. The assistant is system-wide, and a few lines of code will enable it, within an application.

Taking an example, if someone has asked you something on a latest movie or supermarket, Google Now on Tap can instantaneously bring out the details, from the rating of the movie and its trailer or the address and website of the supermarket.

Google Now integrates to Android Assistant API

assisit_api_exampleScreen1: Source App | Screen2: Assistant Overlay Window | Screen3: Destination App

Current Situation: A friend invites you to join him/her on a movie, on a particular date at a particular time. To know what the movie has in store for you, you have to exit the messaging app you were using, open the internet app and search this movie. To get an overall information about what sort of movie this is, you flick through a couple of websites one after the other and then reply with a yes or no.

After Assistant API: Even now, you have been invited to the movie by your friend, but this time, you have Now on Tap. With a long press on the Home Button, the Assistant app will catch the keyphrase ‘the name of the movie’ and will line up a host of information regarding the same, from trailers to ratings and to the app that allows you to book your movie tickets, while also setting the calendar appointment for it.

All you have to do is hold down your home button and say, “OK Google, set a calendar appointment for this.” …and that’s it.

Assist API Lifecycle

The callbacks of the Assist API are actually invoked after the Step 1 (user long presses the Home Button) and before the Step 2 has actually begun (The assistant provides an informative overlay window). Once the user chooses to perform an action, like viewing the trailer on the IMDB app, the assistant obeys and takes the user to the concerned app, using Deep Linking (Step 3).

You can also share additional information of your app to give the best User Experience

If you want a better result from the assistant, it is important to share additional information. Taking an example, if your music app allows the assistant to use information on the current album, it can suggest better and tailored content related to your activity.

In order to provide additional information to the assistant, your app provides global application context by registering an app listener and supplies activity-specific information with activity callbacks as shown in figure:app_listener

To provide global application context, the app creates an implementation of Application.OnProvideAssistDataListener and registers it using registerOnProvideAssistDataListener(android.app.Application.OnProvideAssistDataListener).

Add Deeplink Support to your app, Implementing your own assistant

As other assistants do, Google’s assistant will also take advantage of the Deep Linking procedure. Google Now already uses technology like App Indexing and deep linking, attempting to guide the traffic to the decided destination app. The match done between the context that the user’s current screen has and the potential actions that may be displayed on the overlay window, is peculiarly dependent on the assistant’s implementation. In spite of this, it is important for you to add deep linking support to your app.

Let your apps communicate with other apps!

Don’t keep your apps hidden away by this new feature. What your app truly needs, to get into the limelight, when the Assistant app’s API is launched, is to write a few lines of code, and that’s it. Allow your app to communicate with other apps to keep your customers retained and engaged.

So what are you waiting for? Let your app talk with other apps and give the best user experience.

 
0
Shares
 

So what are you waiting for? Let your app talk with other apps and give the best user experience.

Related Portfolio