HsdpDeepLinkService


public interface HsdpDeepLinkService


The interface to start the Google Play inline install flow with persistent affordance.

Summary

Nested types

Listener for handling events when to stop the Google Play inline install affordance.

Listener for handling events during the Google Play inline install flow.

Listener for handling events during the Google Play inline install prewarm flow.

Constants

default static final String
SDK_VERSION = "2.0.0"

The version of the Google Play inline install SDK.

Public methods

abstract void

Detaches the service client.

abstract void
dismiss(String targetAppPackageName)

Dismisses the Google Play inline install (HSDP) UI.

abstract void
endSession(String targetAppPackageName)

Ends the Google Play inline install (HSDP) session.

abstract void
open(
    String targetAppPackageName,
    String referrer,
    HsdpDeepLinkService.HsdpDeepLinkServiceListener listener
)

Opens the Google Play inline install flow.

abstract void
open(
    String targetAppPackageName,
    String referrer,
    HsdpDeepLinkService.HsdpDeepLinkServiceListener listener,
    @Nullable Map<StringString> extraQueryParams
)

Opens the Google Play inline install flow with extra query parameters.

abstract void
open(
    String targetAppPackageName,
    String referrer,
    HsdpDeepLinkService.HsdpDeepLinkServiceListener listener,
    @Nullable Map<StringString> extraQueryParams,
    boolean autoTrigger
)

Opens the Google Play inline install flow with extra query parameters and auto trigger.

abstract void

Prewarms the Google Play inline install flow.

abstract void
stopAffordance(
    String targetAppPackageName,
    HsdpDeepLinkService.AffordanceListener listener
)

Stops and dismisses the affordance tracking for the Google Play inline install flow.

Constants

SDK_VERSION

default static final String SDK_VERSION = "2.0.0"

The version of the Google Play inline install SDK.

Public methods

detach

abstract void detach()

Detaches the service client. This will disconnect the bound service connections immediately. Callers should call this when they are done with the service.

dismiss

abstract void dismiss(String targetAppPackageName)

Dismisses the Google Play inline install (HSDP) UI. Need to call open() first to show the HSDP UI.

Parameters
String targetAppPackageName

The package name of the app to install.

endSession

abstract void endSession(String targetAppPackageName)

Ends the Google Play inline install (HSDP) session. Need to call open() first to show the HSDP UI.

Parameters
String targetAppPackageName

The package name of the app to install.

open

abstract void open(
    String targetAppPackageName,
    String referrer,
    HsdpDeepLinkService.HsdpDeepLinkServiceListener listener
)

Opens the Google Play inline install flow.

Parameters
String targetAppPackageName

The package name of the app to install.

String referrer

The referrer tracking string.

HsdpDeepLinkService.HsdpDeepLinkServiceListener listener

The listener for the HSDP/HPOA deep link flow.

open

abstract void open(
    String targetAppPackageName,
    String referrer,
    HsdpDeepLinkService.HsdpDeepLinkServiceListener listener,
    @Nullable Map<StringString> extraQueryParams
)

Opens the Google Play inline install flow with extra query parameters.

Parameters
String targetAppPackageName

The package name of the app to install.

String referrer

The referrer tracking string.

HsdpDeepLinkService.HsdpDeepLinkServiceListener listener

The listener for the inline install flow.

@Nullable Map<StringString> extraQueryParams

The extra query params to append on the deep link URL.

open

abstract void open(
    String targetAppPackageName,
    String referrer,
    HsdpDeepLinkService.HsdpDeepLinkServiceListener listener,
    @Nullable Map<StringString> extraQueryParams,
    boolean autoTrigger
)

Opens the Google Play inline install flow with extra query parameters and auto trigger.

Parameters
String targetAppPackageName

The package name of the app to install.

String referrer

The referrer tracking string.

HsdpDeepLinkService.HsdpDeepLinkServiceListener listener

The listener for the inline install flow.

@Nullable Map<StringString> extraQueryParams

The extra query params to append on the deep link URL.

boolean autoTrigger

Whether the HSDP is triggered automatically (as opposed to being triggered manually by user action).

prewarm

abstract void prewarm(
    List<HsdpPrewarmRequest> requests,
    HsdpDeepLinkService.HsdpPrewarmListener listener
)

Prewarms the Google Play inline install flow. This method would be optionally called before calling show() to prewarm the Google Play inline install (HSDP) UI. All prewarm operations are best-effort. There is no guarantee that a prewarm request will be carried out.

Parameters
List<HsdpPrewarmRequest> requests

The list of prewarm requests.

HsdpDeepLinkService.HsdpPrewarmListener listener

The listener for the prewarm flow.

stopAffordance

abstract void stopAffordance(
    String targetAppPackageName,
    HsdpDeepLinkService.AffordanceListener listener
)

Stops and dismisses the affordance tracking for the Google Play inline install flow.

This method should be called when the caller app is no longer interested in tracking the installation state of the app via the affordance.

This method will not dismiss the Google Play inline install (HSDP) pop-up which can only be dismissed by the user.

Parameters
String targetAppPackageName

The package name of the app to install.