Android Open Source - appboy-android-sdk Appboy Navigator

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;
//  w ww.j  av a 2s .c  o  m
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import com.appboy.Constants;
import com.appboy.IAppboyNavigator;
import com.appboy.ui.actions.ActivityAction;
import com.appboy.ui.actions.WebAction;
import com.appboy.ui.activities.AppboyFeedActivity;

public class AppboyNavigator implements IAppboyNavigator {
  private static final String TAG = String.format("%s.%s", Constants.APPBOY_LOG_TAG_PREFIX, AppboyNavigator.class.getName());

  public void gotoNewsFeed(Context context, Bundle extras) {
    // Checks to see if the AppboyFeedActivity is registered in the manifest. If it is, we can
    // open up the Appboy news feed in a new Activity. Otherwise, we just ignore the request.
    ComponentName componentName = new ComponentName(context, AppboyFeedActivity.class);
    try {
      context.getPackageManager().getActivityInfo(componentName, PackageManager.GET_ACTIVITIES);
      Intent intent = new Intent(context, AppboyFeedActivity.class);
      ActivityAction activityAction = new ActivityAction(intent);
    } catch (PackageManager.NameNotFoundException e) {
      Log.d(TAG, "The AppboyFeedActivity is not registered in the manifest. Ignoring request " +
          "to display the news feed.");

  public void gotoURI(Context context, Uri uri, Bundle extras) {
    if (uri == null) {
      Log.e(TAG, "IAppboyNavigator cannot open URI because the URI is null.");
    WebAction webAction = new WebAction(uri.toString());

Java Source Code List