/
Android Inbox and In-App Action Handling

Android Inbox and In-App Action Handling

 There are 6 type of actions which are handled in SDK.

  1. Dismiss (Supported only in In App Messages) : Quick Dismissal of Inapp Messages :  (Full Screen, Modal or Banner)

  2. App Store : Opens Google plays store with the provided <package_name>. Hence, You land directly to the app download page.

  3. Open Landing Page : Open a url either in the Landing Page within the SDK or launch the default browsers (i.e. Chrome Android for Android Mobile devices.)

  4. Deep link 

  5. Custom link

  6. Inbox deeplink in Push Message

These are the following Actions we support for opening Deeplink, Custom Deeplinks and Inbox 

private final String APX_LAUNCH_DEEPLINK_ACTION = "com.appoxee.VIEW_DEEPLINK"; private final String APX_LAUNCH_CUSTOM_ACTION = "com.appoxee.VIEW_CUSTOM_LINKS"; private final String APX_LAUNCH_INBOX_ACTION = "com.appoxee.VIEW_INBOX";


Intent Filters to listen the upcoming deeplinks 


Deeplink:

<intent-filter> <data android:scheme="apx"/> <data android:host="deeplink"/> <action android:name="com.appoxee.VIEW_DEEPLINK"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE"/> </intent-filter>


Custom Links:

<intent-filter> <data android:scheme="apx"/> <data android:host="custom"/> <action android:name="com.appoxee.VIEW_CUSTOM_LINKS"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE"/> </intent-filter>


Inbox:

<intent-filter> <data android:scheme="apx"/> <data android:host="inbox"/> <action android:name="com.appoxee.VIEW_INBOX"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE"/> </intent-filter>


Inside your Activity : Get the deeplink Uri from getIntent inside onCreate() or onResume() or anywhere and accordingly do your job.

Uri uri = null; if (getIntent() != null) { if (APX_LAUNCH_DEEPLINK_ACTION.equals(getIntent().getAction())) { //Can be APX_LAUNCH_DEEPLINK_ACTION or APX_LAUNCH_CUSTOM_ACTION or APX_LAUNCH_INBOX_ACTION uri = getIntent().getData(); if(uri != null) { openDeepLink(uri); } } } private void openDeepLink(Uri uri) { String deeplinkValue = uri.getQueryParameter("link"); String mesageId = uri.getQueryParameter("message_id"); //This is the eventTrigger only for version 5.0.7 and higher String eventTrigger = uri.getQueryParameter("event_trigger"); if(deeplinkValue.equalsIgnoreCase("yourString")) { //do your work here }   if(!TextUtils.isEmpty(mesageId )) { //You received some message id corresponding to some inbox message } }



 

Related content