目录

InstallReferrerClient

Class Info

public abstract class InstallReferrerClient

Abstract class used to obtain install referrer information.

Nested Class Summary

Qualifier and Type

Interface Name and Description

static final class

InstallReferrerClient.Builder

Builder class used to create an InstallReferrerClient instance.

interface

InstallReferrerClient.InstallReferrerResponse

Response to install referrer information.

Public Method Summary

Qualifier and Type

Method Name and Description

abstract void

endConnection()

Ends the service connection and releases occupied resources.

abstract ReferrerDetails

getInstallReferrer()

Obtains install referrer information.

abstract boolean

isReady()

Checks whether the service connection is ready.

InstallReferrerClient.Builder

newBuilder(Context context)

Creates an InstallReferrerClient.Builder instance.

abstract void

startConnection(InstallReferrerStateListener listener)

Starts to connect to the install referrer service.

Public Methods

[h2]endConnection

Method

public abstract void endConnection()

Ends the service connection and releases occupied resources.

If the HMS Core (APK) version on a user device is earlier than 2.6.5, install referrer information cannot be obtained and IOException is thrown.

[h2]getInstallReferrer

Method

public abstract ReferrerDetails getInstallReferrer() throws RemoteException, IOException

Obtains install referrer information.

If the HMS Core (APK) version on a user device is earlier than 2.6.5, install referrer information cannot be obtained and IOException is thrown.

Returns

Type

Description

ReferrerDetails

A ReferrerDetails object.

Throws

Name

Description

RemoteException

If a remote service error occurs.

IOException

If other errors occur.

[h2]isReady

Method

public abstract boolean isReady()

Checks whether the service connection is ready.

If the HMS Core (APK) version on a user device is earlier than 2.6.5, install referrer information cannot be obtained and IOException is thrown.

Returns

Type

Description

boolean

Whether the service is connected and is ready to be called.

  • true: yes
  • false: no

[h2]newBuilder

Method

public static InstallReferrerClient.Builder newBuilder(Context context)

Creates an InstallReferrerClient.Builder instance.

If the HMS Core (APK) version on a user device is earlier than 2.6.5, install referrer information cannot be obtained and IOException is thrown.

Parameters

Name

Description

context

Standard context in Android.

Returns

[h2]startConnection

Method

public abstract void startConnection(InstallReferrerStateListener listener)

Starts to connect to the install referrer service.

If the HMS Core (APK) version on a user device is earlier than 2.6.5, install referrer information cannot be obtained and IOException is thrown.

Parameters

Name

Description

listener

Connection status callback API.