Search in sources :

Example 1 with DeepLink

use of com.airbnb.deeplinkdispatch.DeepLink in project DeepLinkDispatch by airbnb.

the class MainActivity method intentForTaskStackBuilderMethods.

@DeepLink("http://example.com/deepLink/{id}/{name}/{place}")
public static TaskStackBuilder intentForTaskStackBuilderMethods(Context context, Bundle bundle) {
    Log.d(TAG, "without query parameter :");
    if (bundle != null && bundle.containsKey("qp")) {
        Log.d(TAG, "found new parameter :with query parameter :" + bundle.getString("qp"));
    }
    Intent detailsIntent = new Intent(context, SecondActivity.class).setAction(ACTION_DEEP_LINK_COMPLEX);
    Intent parentIntent = new Intent(context, MainActivity.class).setAction(ACTION_DEEP_LINK_COMPLEX);
    TaskStackBuilder taskStackBuilder = TaskStackBuilder.create(context);
    taskStackBuilder.addNextIntent(parentIntent);
    taskStackBuilder.addNextIntent(detailsIntent);
    return taskStackBuilder;
}
Also used : Intent(android.content.Intent) TaskStackBuilder(android.support.v4.app.TaskStackBuilder) DeepLink(com.airbnb.deeplinkdispatch.DeepLink)

Aggregations

Intent (android.content.Intent)1 TaskStackBuilder (android.support.v4.app.TaskStackBuilder)1 DeepLink (com.airbnb.deeplinkdispatch.DeepLink)1