public final class

InstantApps

extends Object
java.lang.Object
   ↳ com.google.android.gms.instantapps.InstantApps

Class Overview

Entry point for Instant Apps APIs.

Summary

Fields
public static final Api<Api.ApiOptions.NoOptions> API Token to pass to addApi(Api) to enable InstantAppsApi.
public static final InstantAppsApi InstantAppsApi Entry point for interacting with InstantAppsApi
Public Methods
static ActivityCompat getActivityCompat(Activity activity)
Returns a helper for Activity functionality that can be used to retrieve information about running instant apps or installed apps.
static PackageManagerWrapper getPackageManager(Context context, boolean useInstalledAppData)
This method is deprecated. Use getPackageManagerCompat(Context) and/or getActivityCompat(Activity). You can filter out data for installed apps by using isInstantApp(String).
static PackageManagerCompat getPackageManagerCompat(Context context)
Returns a helper for PackageManager functionality that can be used to retrieve information about running instant apps or installed apps.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final Api<Api.ApiOptions.NoOptions> API

Token to pass to addApi(Api) to enable InstantAppsApi.

public static final InstantAppsApi InstantAppsApi

Entry point for interacting with InstantAppsApi

Public Methods

public static ActivityCompat getActivityCompat (Activity activity)

Returns a helper for Activity functionality that can be used to retrieve information about running instant apps or installed apps.

Information about instant apps will only be returned for currently running instant apps that include the package name of the calling application in a <instant:uses-app> element under the <application> element in their manifest.

Parameters
activity Activity: the activity on which to query information.
Returns
ActivityCompat

public static PackageManagerWrapper getPackageManager (Context context, boolean useInstalledAppData)

This method is deprecated.
Use getPackageManagerCompat(Context) and/or getActivityCompat(Activity). You can filter out data for installed apps by using isInstantApp(String).

Parameters
context Context
useInstalledAppData boolean
Returns
PackageManagerWrapper

public static PackageManagerCompat getPackageManagerCompat (Context context)

Returns a helper for PackageManager functionality that can be used to retrieve information about running instant apps or installed apps.

Information about instant apps will only be returned for currently running instant apps that include the package name of the calling application in a <instant:uses-app> element under the <application> element in their manifest.

This method will cache a PackageManagerCompat instance for the application context; you can invoke this method in many places in your code (without having to pass around a PackageManagerWrapper interface) without incurring extra allocations.

Parameters
context Context: the current context
Returns
PackageManagerCompat