Android Open Source - appboy-android-sdk Droidboy Application

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.sample;
//ww w  .  j  a  v  a 2s .  c  o m
import android.annotation.TargetApi;
import android.os.Build;
import android.os.StrictMode;
import android.util.Log;
import com.appboy.Appboy;
import com.appboy.Constants;

import java.util.Locale;

public class DroidboyApplication extends Application
  private static final String TAG = String.format("%s.%s", Constants.APPBOY_LOG_TAG_PREFIX, DroidboyApplication.class.getName());

  public void onCreate()
    if (Locale.getDefault().toString().equals("zh_CN")) {
      Log.i(TAG, "Matched zh_CN locale, configuring Appboy with override key");
      Appboy.configure(this, "f9622241-8e26-4366-8183-1c9e310af6b0");
    } else {
      Log.i(TAG, "Did not match zh_CN locale, configuring Appboy to clear any existing override key");
      Appboy.configure(this, null);

  private void activateStrictMode() {
    // Set the activity to Strict mode so that we get LogCat warnings when code misbehaves on the main thread.
    if (BuildConfig.DEBUG
      StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build());

Java Source Code List