Android Open Source - appboy-android-sdk Web Action

From Project

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.

Java Source Code

package com.appboy.ui.actions;
/*w  w w  .  ja  v a2  s  .  c o m*/
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import com.appboy.ui.AppboyWebViewActivity;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

 * Action that launches the AppboyWebViewActivity to a particular URL.
public final class WebAction implements IAction {
  private final String mTargetUrl;
  private final Bundle mExtras;

  private static final List<String> sSupportedSchemes = Collections.unmodifiableList(
      Arrays.asList("http", "https", "ftp", "ftps", "about", "javascript"));

  public WebAction(String targetUrl) {
    this(targetUrl, null);

  public WebAction(String targetUrl, Bundle extras) {
    mTargetUrl = targetUrl;
    mExtras = extras;

  public void execute(Context context) {
    Intent intent = new Intent(context, AppboyWebViewActivity.class);
    if (mExtras != null) {
    intent.putExtra(AppboyWebViewActivity.URL_EXTRA, mTargetUrl);

  public static List<String> getSupportedSchemes() {
    return sSupportedSchemes;

Java Source Code List