java.lang.Object | |
↳ | com.google.android.gms.appinvite.AppInviteReferral |
This class is deprecated.
Use FirebaseAppInvite
, returned by getInvitation(com.google.firebase.dynamiclinks.PendingDynamicLinkData)
,
which holds the deep link and invitation id.
Provides accessors to the referral data consisting of an invitation id and possibly a deep link
if set using setDeepLink(Uri)
. The referral data is
made available to the application when it is opened after a user accepts an invitation created
with AppInviteInvitation
.
When the user accepts an invitation and the application is not already installed, the user
will enter a flow to install and open the application. After install the AppInvite referral data
will be available and can be accessed using getInvitation(GoogleApiClient, android.app.Activity, boolean)
.
If the app is already installed, the referral data is included in the intent returned from getIntent(). The deep link will launch the app into a specified activity if filters have been setup to trigger on the deeplink, see Enabling Deep Links for App Content.
In both cases, the referral data is made available to the application. To check if the
referral data is present use hasReferral(Intent)
and if true, then access the data using
getInvitationId(android.content.Intent)
and getDeepLink(android.content.Intent)
from the intent returned from getInvitationIntent()
. If the
deep link was not set when creating the invitation, the invitationIntent will not include a deep
link and the app will be start in its main activity.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
Use
getInvitation(GoogleApiClient, android.app.Activity, boolean) to access AppInvite referrer data rather than implementing a Play Store broadcast
receiver.
| |||||||||||
This method is deprecated.
Use
getInvitation(GoogleApiClient, android.app.Activity, boolean) to access AppInvite referrer data rather than implementing a Play Store broadcast
receiver.
| |||||||||||
Returns an deep link from an invitation if the deep link was set when the invitation was
created.
| |||||||||||
Get the invitation id from the referralIntent.
| |||||||||||
Determine if the referralIntent includes referral data.
| |||||||||||
Determine if the app was opened after installation from the play store.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
This method is deprecated.
Use getInvitation(GoogleApiClient, android.app.Activity, boolean)
to access AppInvite referrer data rather than implementing a Play Store broadcast
receiver.
Extract the referrer data from the playStoreReferrerIntent as sent from the play store and add
it to an intent that can then be sent to an application activity. The referrer broadcast is
sent immediately after the application is opened after being installed from the play store. To
access the broadcast intent, the application must implement a
InstallReferrerReceiver broadcast receiver, the intent received is the
playStoreReferrerIntent. The referrer data is extracted from the playStoreReferrerIntent and
added to the referralIntent where it can then be retrieved from the referralIntent using getInvitationId(android.content.Intent)
and getDeepLink(android.content.Intent)
.
Parameters | |
---|---|
playStoreReferrerIntent |
Intent : The intent send with the play store broadcast. |
referralIntent |
Intent : An Intent that the playStoreReferrerIntent referral data will be added
to. If null, the referral data will not be added. |
Returns | |
---|---|
Intent |
The referralIntent with the referral data or null if the referralIntent is null. |
This method is deprecated.
Use getInvitation(GoogleApiClient, android.app.Activity, boolean)
to access AppInvite referrer data rather than implementing a Play Store broadcast
receiver.
Create a referral bundle from invitation id and deeplink, attach to the intent as an extra.
Parameters | |
---|---|
invitationId |
String : Invitation id. |
deepLink |
String : Deep link string. |
referralIntent |
Intent : Intent to add the bundle to. |
Returns | |
---|---|
Intent |
The referralIntent updated with the bundle extra. |
Returns an deep link from an invitation if the deep link was set when the invitation was created.
Parameters | |
---|---|
referralIntent |
Intent : Intent returned from getInvitationIntent() after Play Store install or getIntent()
for an existing installed app. |
Returns | |
---|---|
String |
The deep link if the deep link was set when creating the invitation, null otherwise. |
Get the invitation id from the referralIntent.
Parameters | |
---|---|
referralIntent |
Intent : Intent returned from getInvitationIntent() after Play Store install or getIntent()
for an existing installed app. |
Returns | |
---|---|
String |
The invitation id or null if not present. The invitation id should always be present if
hasReferral(Intent) is true.
|
Determine if the referralIntent includes referral data.
Parameters | |
---|---|
referralIntent |
Intent : Intent returned from getInvitationIntent() after Play Store install or getIntent()
for an existing installed app. |
Returns | |
---|---|
boolean |
True if the referralIntent includes referral data, false otherwise. |
Determine if the app was opened after installation from the play store.
Parameters | |
---|---|
referralIntent |
Intent : Intent returned from getInvitationIntent() after Play Store install or getIntent()
for an existing installed app. |
Returns | |
---|---|
boolean |
True if the app was opened after Play Store installation, false otherwise. |