Class Info |
|---|
public abstract class InstallReferrerClient Abstract class used to obtain install referrer information. |
Qualifier and Type | Interface Name and Description |
|---|---|
static final class | Builder class used to create an InstallReferrerClient instance. |
interface | InstallReferrerClient.InstallReferrerResponse Response to install referrer information. |
Qualifier and Type | Method Name and Description |
|---|---|
abstract void | Ends the service connection and releases occupied resources. |
abstract ReferrerDetails | Obtains install referrer information. |
abstract boolean | isReady() Checks whether the service connection is ready. |
newBuilder(Context context) Creates an InstallReferrerClient.Builder instance. | |
abstract void | startConnection(InstallReferrerStateListener listener) Starts to connect to the install referrer service. |
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. |
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 |
|---|---|
A ReferrerDetails object. |
Throws
Name | Description |
|---|---|
RemoteException | If a remote service error occurs. |
IOException | If other errors occur. |
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.
|
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
Type | Description |
|---|---|
An InstallReferrerClient.Builder object. |
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. |