Tutorials Android Invite People to Download App Using Firebase AppInviteInvitation

Invite People to Download App Using Firebase AppInviteInvitation

Firebase Invites are an out-of-the-box solution for app referrals and sharing via email or SMS. Firebase Android SDK allows you to send and receive invites from an Android application.

Build an Intent to launch the invitation Activity to create and send invitations. The Intent returned from build() should be used to start the Activity using startActivityForResult(android.content.Intent, int).

public static void sendFirebaseInvite(Activity activity, int requestCode) {
        Intent intent = new AppInviteInvitation.IntentBuilder(activity.getString(R.string.invitation_title))
                .setMessage(activity.getString(R.string.invitation_message))
                .setDeepLink(Uri.parse(activity.getString(R.string.invitation_deep_link)))
                .setCustomImage(Uri.parse(activity.getString(R.string.invitation_custom_image)))
                .setCallToActionText(activity.getString(R.string.invitation_cta))
                .build();
        activity.startActivityForResult(intent, requestCode);
    }
Total
1
Shares
guest
0 Comments
Inline Feedbacks
View all comments
Previous Post
Adsense Dashboard Material Design

Google Brings Material Design to AdSense Dashboard

Next Post
Android Tutorials

How to Add Rate On Google Play Button in Android

Related Posts
By clicking “Allow All”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Cookie Notice
Allow All
0
Would love your thoughts, please comment.x
()
x