8

In AndroidManifest I have

<activity android:name=".MainActivity">
    <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="linhtestdeeplink"
            android:scheme="app"/>
    </intent-filter>
</activity>

In MainActivity

AppLinkData.fetchDeferredAppLinkData(this,
        new AppLinkData.CompletionHandler() {
            @Override
            public void onDeferredAppLinkDataFetched(final AppLinkData appLinkData) {
                // Process app link data
                Log.i("TAG", "Deep link receive" + appLinkData);
            }
        }
);

In Facebook page, I test Deep Link like

enter image description here

My app received a notification, when I click at the notification it will launch my app but the appLinkData always null.
I also send like linhtestdeeplink://tripId=1 but it also null.
Any help or suggestion would be great appreciated.
I am using facebook sdk 4.5 compile 'com.facebook.android:facebook-android-sdk:[4,5)'

Linh
  • 43,513
  • 18
  • 206
  • 227

1 Answers1

4

Deep link format is <scheme>://<host> so your deep link should look like this: app://linhtestdeeplink?tripId=1

Duda
  • 1,574
  • 15
  • 20