Android deepLink Listener not getting called.


I have a react native app, where we have integrated the Android SDK natively and subclassed `Autopilot` as you have described.  Takeoff is called from the native side.

I am trying to configure the app to handle deeplinks, everything is working great on iOS side with UrbanAirship.addListener('deepLink', onLink); however onLink is not getting called on android. 

I have tried adding an intent filter like;
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="@string/app_link_scheme" android:host="@string/app_link_host" android:pathPrefix="@string/app_link_prefix" />

but still no luck.

Am I missing some configuration?

Also, your docs ( describe...

airship.setDeepLinkListener(deepLink -> {
// Handle the deepLink
return true;

I think this documentation needs to be updated as this method does not exist.. 



Didn't find what you were looking for?

New post



  • Hi PK,

    May I ask if you have already taken a look at the Airship github repository? Here is a link to the react-native-module that contains the addListener method:

    With that being said, I'm not seeing where you can pass that onlink argument when calling 'addAndroidListener' as it only accepts one a string for the event name, which in your case is called 'deeplink':

    void addAndroidListener(String eventName) { ... }

    Looking forward to your response...

    Kind regards,
    Chilun Liu
    Senior Technical Support Engineer

    The Embassy Tea House, 195-205 Union Street, London, SE1 0LN
    Portland | San Francisco | London | Paris | New York | New Delhi

    Comment actions Permalink
  • Hi Chilun,

    Quick reminder this is a react native project.

    I kind of realized last night that initializing airship from native android does not work so well, I tested with your prescribed file and everything works as expected.  Interestingly, I am able to takeoff on native iOS and iOSReactModule seems to be ok with it and everything works.  

    Android was difficult because I subclasses Autopilot to configure, which it looks like UrbanAirshipReactModule (android) does as well, then, on a prayer, I tried to subclass ReactAutopilot, but to no avail.  

    This app will have the need to point to several different Airship instances.  Because of that, a monolithic is problematic.

    Is there any way to specify the location/name of the file to UrbanAirshipReactModule?


    Is there a way to use createAirshipConfigOptions to configure airship keys/secrets for UrbanAirshipReactModule (android)?


    We will only need to be dynamic at build time, no run time environment switches.

    Hope this is clear, thanks



    Comment actions Permalink
  • Also, I realized that AirshipReactNative is using AirshipAndroid version 9.7.1 which explains why airship.setDeepLinkListener does not exist and your documentation is current.


    Lots of moving parts...

    Comment actions Permalink
  • Hi PK,

    My colleague Ryan had updated the react native module very recently, see the changelog here:

    May I ask which version you are on and if it's older than 3.0.0, can you try updating your version to that along with your version of the Android SDK to 10.0.1?

    King regards,



    Comment actions Permalink
  • Chilun,


    Why are you asking me to do upgrade?


    Have you confirmed that on the new version one can call takeoff from the native side and the AirshipReactModule will be able to play nicely with that?

    Comment actions Permalink
  • Hi Chilun,


    Just wanted to circle back.  I never upgraded but got this working by subclassing ReactAutopilot, my fatal mistake from before, was not calling super.onAirshipReady(airship)

    Now everything is working as expected.

    Darn careless mistakes.  


    Comment actions Permalink

Please sign in to leave a comment.