Invite Friends (Deprecated)

Warning

Invite Friends provided by Digits is not being migrated to Firebase Auth and will no longer work effective September 30th. For more information, please see our FAQ and migration guide.

Note

Beta indicates an experimental feature. Breaking changes may happen with each release until this is no longer in Beta.

There are (at least) two fundamental requirements for a successful app - the app has to engage and delight their users, making them want to share it with their friends, and it must be easy for the user to share the app with their community.

Leave us to handle the latter - leaving you more time and energy to devote to making apps that users love.

Invite Friends can help your app grow your users, by enabling users to invite friends from their address book to join the app. Not only do we handle the UI and analytics, but in Default mode, the invite message and url generation as well. The best part is that sending invites is Digits-session angostic - it works whether your user is signed into Digits or not.

Note

If the sender is a Digits user, Digits will track invitations and their state on server side for 30 days. For logged-out users, Digits will only track the invited state in the current invitation flow session. If the user exits the view and then re-enters, invitation state may be lost.

Currently we support two different modes of this feature:

  • Easy mode: We provide a drop-in invitation flow for your app’s users. If the sender is already a Digits user, Digits will automatically track the invite status along it’s lifecyle.
  • Advanced mode: You can extend the InviteFactory and define how an invite url or message is generated.

As always, the Invite Friends UI honors the theming settings as mentioned in Theming.

Easy Mode

Triggering the Invite Flow

In Easy mode, we provide the following methods on the Digits singleton.

Digits.inviteFriends();
Digits.inviteFriends(Bundle args, Integer requestCode);

This method handles launching the Invite activity. If the requestCode is provided, when the user backs out of the Invite activity, onActivityResult is populated with the phone numbers that have been invited by the user.

When you use Easy mode, Digits handles the localization of the message text provided, as well as generates the app url using your apps bundle id, linking the invited user to the Google Play store: http://play.google.com/store/apps/details?id=com.your.app. If you are using your own link generation, or want to modify the default text, use the Advanced Mode below.

Note

As mentioned above, Invite Friends is Digits session agnostic - we will detect if there is an active Digits session, and proceed with the improved tracking if it exists, otherwise will continue in the ‘degraded’ invites mode. We recommend calling Digits.inviteFriends(...) after Digits.authenticate(...) for the best attribution tracking.

Analytics

If your app also has Answers installed, the following Answers events will be generated to help you track metrics around users’ invite activities.

  • Digits-Invite-Sent : This event is created when an app user sends out an invite by clicking “Invite” or “Invited” button from the invite view.
  • Digits-Invite-Converted : This event is created when an invited user signs into Digits with matching “Pending” invites. Since we only track pending invites on server side for logged-in users, this Answers’ event is only available when invites are sent by a logged-in user. If there are multiple pending invitations to a specific phone number, then a single “Digits-Invite-Recipient-Joined” event will be sent for each and all of these pending invites will be turned into the converted state on Digits server side.

The DigitsEventLogger (see Analytics) triggers 3 Invite Friends events for use with another analytics provider.

// Triggered when the user launches the Invites Friends screen
public void findFriendsScreenImpression(FindFriendsImpressionDetails details){}

// Triggered when the user sends an invite (used for Answers event 'Digits-Invite-Sent')
public void inviteClickedOnFindFriendScreen(InviteClickedOnFindFriendScreenDetails details){}

// Triggered when an invited user joins the app (used for Answers event 'Digits-Invite-Converted').
// Triggered once per attributable invite
public void joinNotify(JoinNotifyDetails details){}

Theming when using Easy Mode

The UI view displayed in Easy mode will be subject to the theming settings as mentioned in Theming.

Advanced Mode

In Advanced Mode, you can override the default invite text and track additional parameters when generating the invite links.

Analytics

You get the same default Answers events and DigitsEventLogger events as in the Easy mode.