Back to project page appboy-android-sdk.
The source code is released under:
Copyright (c) 2014 Appboy, Inc. All rights reserved. * Use of source code or binaries contained within Appboy's Android SDK is permitted only to enable use of the Appboy platform by customers of Appb...
If you think the Android project appboy-android-sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.appboy.ui.actions; //from w w w.ja va 2 s. c o m import android.content.Context; import android.net.Uri; import android.os.Bundle; import com.appboy.ui.support.StringUtils; public class ActionFactory { public static IAction createUriAction(Context context, String url) { return createUriAction(context, url, null); } public static IAction createUriAction(Context context, String url, Bundle extras) { if (!StringUtils.isNullOrBlank(url)) { Uri uri = Uri.parse(url); if (WebAction.getSupportedSchemes().contains(uri.getScheme())) { return new WebAction(url, extras); } else if ("intent".equals(uri.getScheme())) { return new ActivityAction(context.getPackageName(), uri, extras); } else { return new ViewAction(uri, extras); } } return null; } }