'com.google.firebase:firebase-invites:9.2.0' } // ADD THIS AT THE BOTTOM apply plugin: 'com.google.gms.google-services' %ZOBNJD-JOLTPO"OESPJEʢʣ app/build.gradle file
add an intent filter to the activity that handles deep links for your app <intent-filter> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE"/> <data android:host="example.com" android:scheme="http"/> <data android:host="example.com" android:scheme="https"/> </intent-filter> AndroidManifest.xml
{ // ... // Build GoogleApiClient with AppInvite API for receiving deep links mGoogleApiClient = new GoogleApiClient.Builder(this) .enableAutoManage(this, this) .addApi(AppInvite.API) .build(); ***Activity.java
void onResult(@NonNull AppInviteInvitationResult result) { if (result.getStatus().isSuccess()) { // Extract deep link from Intent Intent intent = result.getInvitationIntent(); String deepLink = AppInviteReferral.getDeepLink(intent); // Handle the deep link. For example, open the linked content } else { // no deep link found. } } }); } ***Activity.javaɹ