Java Code Examples for cn.jpush.android.api.JPushInterface#setDebugMode()

The following examples show how to use cn.jpush.android.api.JPushInterface#setDebugMode() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LetvApplication.java    From letv with Apache License 2.0 5 votes vote down vote up
public void init() {
    super.init();
    LogInfo.log("zhuqiao", "call init");
    initInMainProcess();
    JPushInterface.setDebugMode(false);
    JPushInterface.init(this);
    this.mLeBoxApp = LeBoxApp.getInstanced();
    this.mLeBoxApp.init((Application) this);
    if (NetworkUtils.isUnicom3G(true)) {
        ((IWoFlowManager) JarLoader.invokeStaticMethod(JarLoader.loadClass(this, JarConstant.LETV_WO_NAME, JarConstant.LETV_WO_PACKAGENAME, "WoFlowManager"), "getInstance", null, null)).initSDK(this, Boolean.valueOf(false));
        LogInfo.log("zhuqiao", "init wo");
        this.mUnicomFreeInfoCache = new UnicomFreeInfoCache();
    }
    initLetvMediaPlayerManager();
    setVType();
    LetvPushService.schedule(this);
    startCde();
    LetvHttpApiConfig.initialize(Global.PCODE, Global.VERSION);
    LeboxApiManager.getInstance().setLetvMediaPlayer(new LetvMediaPlayer(this) {
        final /* synthetic */ LetvApplication this$0;

        {
            if (HotFix.PREVENT_VERIFY) {
                System.out.println(VerifyLoad.class);
            }
            this.this$0 = this$0;
        }

        public void doPlay(Context context, LeboxVideoBean video) {
            LogInfo.log("zhuqiao", "vid:" + video.vid + ";videoUrl:" + video.videoURL);
            LeMessageManager.getInstance().dispatchMessage(new LeMessage(1, new AlbumPlayActivityConfig(context).createLebox(video)));
        }
    });
}
 
Example 2
Source File: App.java    From LiuAGeAndroid with MIT License 5 votes vote down vote up
@Override
    public void onCreate() {
        super.onCreate();

        app = this;

        // 存放所有activity的集合
        mActivityList = new ArrayList<>();

        // 初始化app异常处理器 - 打包的时候开启
//        CrashHandler handler = CrashHandler.getInstance();
//        handler.init(getApplicationContext());

        // 初始化OkHttpUtils
        OkHttpClient okHttpClient = new OkHttpClient.Builder()
                .connectTimeout(10000L, TimeUnit.MILLISECONDS)
                .readTimeout(10000L, TimeUnit.MILLISECONDS)
                //其他配置
                .build();
        OkHttpUtils.initClient(okHttpClient);

        // 初始化Fresco
        ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this)
                .setProgressiveJpegConfig(new SimpleProgressiveJpegConfig())
                .build();
        Fresco.initialize(this, config);

        // 初始化ShareSDK
        ShareSDK.initSDK(this);

        // 初始化JPush
        JPushInterface.setDebugMode(true);
        JPushInterface.init(this);

        // 更新用户登录状态
        UserBean.updateUserInfoFromNetwork(new UserBean.OnUpdatedUserInfoListener());

    }
 
Example 3
Source File: BaseApplication.java    From Android-IM with Apache License 2.0 5 votes vote down vote up
@Override
    public void onCreate() {
        super.onCreate();
        baseApplication = this;
        MultiDex.install(this);
        sharedPrefHelper = SharedPrefHelper.getInstance();
        sharedPrefHelper.setRoaming(true);
        //开启极光调试
        JPushInterface.setDebugMode(true);
        mContext = BaseApplication.this;
        //实例化极光推送
        JPushInterface.init(mContext);
        //实例化极光IM,并自动同步聊天记录
        JMessageClient.init(getApplicationContext(), true);
        JMessageClient.setDebugMode(true);
        //初始化极光sms
//        SMSSDK.getInstance().initSdk(mContext);
        //初始化数据库
        setupDatabase();
        //通知管理,通知栏开启,其他关闭
        JMessageClient.setNotificationFlag(FLAG_NOTIFY_SILENCE);
        //初始化utils
        Utils.init(this);
        //推送状态
        initJPush2();
        //初始化统计
        JAnalyticsInterface.init(mContext);
        JAnalyticsInterface.setDebugMode(true);

    }
 
Example 4
Source File: BaseApplication.java    From QuickNews with MIT License 5 votes vote down vote up
@Override
public void onCreate() {
    Log.d(TAG, "[ExampleApplication] onCreate");
    super.onCreate();

    JPushInterface.setDebugMode(true); 	// 设置开启日志,发布时请关闭日志
    JPushInterface.init(this);     		// 初始化 JPush
}
 
Example 5
Source File: JPushManager.java    From AndroidPush with Apache License 2.0 5 votes vote down vote up
@Override
public void register(Context context, boolean debug, PushInterface pushInterface) {
    if (pushInterface != null) {
        JPushReceiver.registerInterface(pushInterface);
    }
    JPushInterface.init(context);
    JPushInterface.setDebugMode(debug);
}
 
Example 6
Source File: GosPushManager.java    From GOpenSource_AppKit_Android_AS with MIT License 5 votes vote down vote up
/**
 * 此方法完成了初始化JPush SDK等功能 但仍需在MainActivity的onResume和onPause添加相应方法
 * JPushInterface.onResume(context); JPushInterface.onPause(context);
 * 
 * @param context
 */
public void jPush() {
	// 设置JPush调试模式
	JPushInterface.setDebugMode(true);

	// 初始化JPushSDK
	JPushInterface.init(context);

}
 
Example 7
Source File: App.java    From phphub-android with Apache License 2.0 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    Fresco.initialize(this);
    LeakCanary.install(this);
    JPushInterface.setDebugMode(BuildConfig.DEBUG);
    JPushInterface.init(this);

    initializeInjector();
    initializeInjectorApi();

    Iconify.with(new FontAwesomeModule());
}
 
Example 8
Source File: GosPushManager.java    From Gizwits-SmartBuld_Android with MIT License 5 votes vote down vote up
/**
 * 此方法完成了初始化JPush SDK等功能 但仍需在MainActivity的onResume和onPause添加相应方法
 * JPushInterface.onResume(context); JPushInterface.onPause(context);
 * 
 * @param context
 */
public void jPush() {
	// 设置JPush调试模式
	JPushInterface.setDebugMode(true);

	// 初始化JPushSDK
	JPushInterface.init(context);

}
 
Example 9
Source File: GosPushManager.java    From gokit-android with MIT License 5 votes vote down vote up
/**
 * 此方法完成了初始化JPush SDK等功能 但仍需在MainActivity的onResume和onPause添加相应方法
 * JPushInterface.onResume(context); JPushInterface.onPause(context);
 * 
 * @param context
 */
public void jPush() {
	// 设置JPush调试模式
	JPushInterface.setDebugMode(true);

	// 初始化JPushSDK
	JPushInterface.init(context);

}
 
Example 10
Source File: RLPushHelper.java    From Roid-Library with Apache License 2.0 5 votes vote down vote up
/**
 * @param isDebug
 */
public void init(boolean isDebug) {
    JPushInterface.setDebugMode(isDebug);
    JPushInterface.init(mContext);
    JPushInterface.setLatestNotifactionNumber(mContext, LASTEST_NOTIFICATION_NUMBER);
    BasicPushNotificationBuilder builder = new BasicPushNotificationBuilder(mContext);
    builder.notificationFlags = Notification.FLAG_AUTO_CANCEL;
    builder.notificationDefaults = Notification.DEFAULT_SOUND | Notification.DEFAULT_VIBRATE;
    builder.developerArg0 = "data";
    JPushInterface.setPushNotificationBuilder(1, builder);
}
 
Example 11
Source File: CompatibilityDemoInit.java    From ans-android-sdk with GNU General Public License v3.0 4 votes vote down vote up
private static void initJPush() {
    JPushInterface.setDebugMode(true);
    JPushInterface.init(mContext);
}
 
Example 12
Source File: LQBApp.java    From AndroidFrame with Apache License 2.0 4 votes vote down vote up
/**
 * 初始化极光推送sdk
 */
private void initJpushSDK() {
    JPushInterface.setDebugMode(true);
    JPushInterface.init(this);
}
 
Example 13
Source File: AppApplication.java    From fvip with Apache License 2.0 4 votes vote down vote up
private void initJpush() {
    JPushInterface.init(this);
    JPushInterface.setDebugMode(true);//如果时正式版就改成false
    JAnalyticsInterface.init(this);
}
 
Example 14
Source File: P2PApplication.java    From iMoney with Apache License 2.0 4 votes vote down vote up
private void initJPushSdk() {
    JPushInterface.setDebugMode(BuildConfig.DEBUG);
    JPushInterface.init(this);
}