Beispiel #1
0
 public void init(Context context) {
   JPushInterface.setDebugMode(true);
   JPushInterface.init(context);
   registerMessageReceiver(context);
   client = new ApacheHttpClient(new HttpConfig(context));
   Core.context = context;
 }
Beispiel #2
0
 @Override
 public void onCreate() {
   super.onCreate();
   BaiduManager.init(this);
   JPushInterface.setDebugMode(true); // 设置开启日志,发布时请关闭日志
   JPushInterface.init(this); // 初始化 JPush
 }
Beispiel #3
0
  @Override
  public void onCreate() {
    Log.d(TAG, "onCreate");
    super.onCreate();

    JPushInterface.setDebugMode(true); // 设置开启日志,发布时请关闭日志
    JPushInterface.init(this); // 初始化 JPush
  }
Beispiel #4
0
  @Override
  public void onCreate() {
    super.onCreate();

    sContext = getApplicationContext();

    instance = this;

    // 初始化 jpush
    JPushInterface.setDebugMode(true);
    JPushInterface.init(this);
  }
Beispiel #5
0
  @Override
  public void onCreate() {
    super.onCreate();
    JPushInterface.setDebugMode(true);
    JPushInterface.init(this);
    RongIM.init(this, "pvxdm17jx5lmr", R.drawable.mineral_logo);
    if (SettingUtil.getInstance(getApplicationContext())
        .getValue(SettingUtil.KEY_ACCEPT_PUSH_NOTIFICATION, true)) {
      JPushInterface.resumePush(getApplicationContext());

    } else {
      JPushInterface.stopPush(getApplicationContext());
    }
  }
 void setDebugMode(JSONArray data, CallbackContext callbackContext) {
   boolean mode;
   try {
     mode = data.getBoolean(0);
     // if (mode.equals("true")) {
     // 	JPushInterface.setDebugMode(true);
     // } else if (mode.equals("false")) {
     // 	JPushInterface.setDebugMode(false);
     // } else {
     // 	callbackContext.error("error mode");
     // }
     JPushInterface.setDebugMode(mode);
     callbackContext.success();
   } catch (JSONException e) {
   }
 }
Beispiel #7
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    //		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.activity_splash);
    JPushInterface.setDebugMode(true);
    JPushInterface.init(this);

    new Handler()
        .postDelayed(
            new Runnable() {

              @Override
              public void run() {

                Intent intent = new Intent(SplashActivity.this, MainActivity.class);
                SplashActivity.this.startActivity(intent);
                SplashActivity.this.finish();
              }
            },
            SPLASH_DISPLAY_LENGTH);
  }
 // 初始化推送
 private void initJpush() {
   JPushInterface.setDebugMode(BuildConfig.DEBUG); // 设置开启日志,发布时请关闭日志
   JPushInterface.init(this); // 初始化 JPush
   JPushInterface.setLatestNotifactionNumber(this, 3); // 设置保留最近通知条数 API
 }
Beispiel #9
0
 private void initJPush() {
   JPushInterface.setDebugMode(true);
   JPushInterface.init(this);
 }
Beispiel #10
0
 private void initJPush() {
   boolean debug = AppInfo.createInstance(this).isDebuggable();
   JPushInterface.setDebugMode(debug);
   JPushInterface.init(this);
 }