InstallReferrerClient
public
abstract
class
InstallReferrerClient
extends Object
java.lang.Object | |
↳ | com.android.installreferrer.api.InstallReferrerClient |
Main interface for communication between the library and user application code.
Summary
Nested classes | |
---|---|
class |
InstallReferrerClient.Builder
Builder to configure and create a InstallReferrer instance. |
@interface |
InstallReferrerClient.InstallReferrerResponse
Possible return codes. |
Public constructors | |
---|---|
InstallReferrerClient()
|
Public methods | |
---|---|
abstract
void
|
endConnection()
Close the connection and release all held resources such as service connections. |
abstract
ReferrerDetails
|
getInstallReferrer()
Get installation referrer details. |
abstract
boolean
|
isReady()
Checks if the client is currently connected to the service, so that requests to other methods will succeed. |
static
InstallReferrerClient.Builder
|
newBuilder(Context context)
Constructs a new |
abstract
void
|
startConnection(InstallReferrerStateListener listener)
Starts up InstallReferrerClient setup process asynchronously. |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
Public constructors
InstallReferrerClient
InstallReferrerClient ()
Public methods
endConnection
void endConnection ()
Close the connection and release all held resources such as service connections.
Call this method once you are done with this InstallReferrerClient reference.
getInstallReferrer
ReferrerDetails getInstallReferrer ()
Get installation referrer details. This method uses information stored by the Google Play Store app without initiating a network request.
Returns | |
---|---|
ReferrerDetails |
ReferrerDetails The ReferrerDetails with all install referrer information.
|
Throws | |
---|---|
RemoteException |
isReady
boolean isReady ()
Checks if the client is currently connected to the service, so that requests to other methods will succeed.
Returns true if the client is currently connected to the service, false otherwise.
Note: It also means that Install Referrer API is available for the current device.
Returns | |
---|---|
boolean |
newBuilder
InstallReferrerClient.Builder newBuilder (Context context)
Constructs a new InstallReferrerClient.Builder
instance.
Parameters | |
---|---|
context |
Context : It will be used to get an application context to bind to the Install Referrer
service.
|
Returns | |
---|---|
InstallReferrerClient.Builder |
startConnection
void startConnection (InstallReferrerStateListener listener)
Starts up InstallReferrerClient setup process asynchronously. You will be notified through the
InstallReferrerStateListener
listener when the setup process is complete.
Parameters | |
---|---|
listener |
InstallReferrerStateListener : The listener to notify when the setup process is complete.
|
Annotations
Interfaces
Classes