本文整理匯總了Java中cn.jpush.android.api.JPushInterface.setDebugMode方法的典型用法代碼示例。如果您正苦於以下問題:Java JPushInterface.setDebugMode方法的具體用法?Java JPushInterface.setDebugMode怎麽用?Java JPushInterface.setDebugMode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cn.jpush.android.api.JPushInterface
的用法示例。
在下文中一共展示了JPushInterface.setDebugMode方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onCreate
import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
@Override
public void onCreate()
{
super.onCreate();
// initTypeface();
ImageLoaderConfiguration configuration = new ImageLoaderConfiguration.Builder
(getApplicationContext())
.memoryCache(new LruMemoryCache(2 * 1024 * 1024))
.memoryCacheSize(2 * 1024 * 1024)
.diskCacheSize(50 * 1024 * 1024)
.diskCacheFileCount(100)
.diskCache(new UnlimitedDiskCache(FileUtils.getImageCacheDir()))
// .writeDebugLogs()
.build();
//Initialize ImageLoader with configuration.
JMessageClient.init(getApplicationContext());
JPushInterface.setDebugMode(true);
JMessageClient.setNotificationMode(JMessageClient.NOTI_MODE_DEFAULT);
ImageLoader.getInstance().init(configuration);
}
示例2: init
import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
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)));
}
});
}
示例3: onCreate
import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
@Override
public void onCreate() {
Log.d(TAG, "[ExampleApplication] onCreate");
super.onCreate();
JPushInterface.setDebugMode(true); // 設置開啟日誌,發布時請關閉日誌
JPushInterface.init(this); // 初始化 JPush
}
示例4: onCreate
import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
@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());
}
示例5: onCreate
import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
@Override
public void onCreate() {
super.onCreate();
//Mob平台授權
ShareSDK.initSDK(this);
JPushInterface.setDebugMode(true);
// 設置開啟日誌,發布時請關閉日誌
JPushInterface.init(this);
// 初始化 JPush
app = this;
registerActivityLifecycleCallbacks();
}
示例6: setDebugMode
import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
public static void setDebugMode(JSONArray data, CallbackContext callbackContext) {
boolean mode;
try {
mode = data.getBoolean(0);
JPushInterface.setDebugMode(mode);
} catch (JSONException e) {
e.printStackTrace();
}
}
示例7: initConfigs
import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
/**
* 初始化配置信息
*
* @param isDebugMode 是否是開發模式
*/
private void initConfigs(boolean isDebugMode) {
// 友盟在線參數調式模式:開啟
OnlineConfigAgent.getInstance().setDebugMode(isDebugMode);
// 友盟統計調式模式:開啟
MobclickAgent.setDebugMode(isDebugMode);
// Initialize JPush
JPushInterface.setDebugMode(isDebugMode); // 設置開啟日誌,發布時需關閉日誌
if (isDebugMode) { // 開發模式
Logger
.init(TAG) // default PRETTYLOGGER or use just init()
.setMethodCount(3) // default 2
.hideThreadInfo() // default shown
.setLogLevel(LogLevel.FULL); // default LogLevel.FULL | LogLevel.NONE
// Initialize the hawk
Hawk.init(this)
.setEncryptionMethod(HawkBuilder.EncryptionMethod.MEDIUM)
.setStorage(HawkBuilder.newSqliteStorage(this))
.setLogLevel(com.orhanobut.hawk.LogLevel.FULL)
.build();
} else {
Logger
.init(TAG) // default PRETTYLOGGER or use just init()
.setMethodCount(3) // default 2
.hideThreadInfo() // default shown
.setLogLevel(LogLevel.NONE); // default LogLevel.FULL | LogLevel.NONE
// Initialize the hawk
Hawk.init(this)
.setEncryptionMethod(HawkBuilder.EncryptionMethod.MEDIUM)
.setStorage(HawkBuilder.newSqliteStorage(this))
.setLogLevel(com.orhanobut.hawk.LogLevel.NONE)
.build();
}
}
示例8: onCreate
import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
@Override
public void onCreate() {
Log.d(TAG, "[ExampleApplication] onCreate");
super.onCreate();
JPushInterface.setDebugMode(true); // 設置開啟日誌,發布時請關閉日誌
JPushInterface.init(this); // 初始化 JPush
}
示例9: onCreate
import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.d("super.onCreate","savedInstanceState");
setContentView(R.layout.activity_main_2);
Log.d("setContentView","R.layout.activity_main_2");
mContext=this;
confirm = (Button) findViewById(R.id.initation);
login = (Button) findViewById(R.id.Rdial);
beatH = (Button) findViewById(R.id.heartb);
state = (Button) findViewById(R.id.state);
username = (EditText) findViewById(R.id.editText1);
password = (EditText) findViewById(R.id.editText2);
root = (EditText) findViewById(R.id.editText3);
about = (TextView) findViewById(R.id.guanyu);
beatH.setOnClickListener(this);
confirm.setOnClickListener(this);
login.setOnClickListener(this);
about.setOnClickListener(this);
state.setOnClickListener(this);
sharedPre = getSharedPreferences("config",MODE_PRIVATE);
editor = sharedPre.edit();
String u = sharedPre.getString("username", "[email protected]");
username.setText(u.toCharArray(), 0, u.length());
String p = sharedPre.getString("password", "123456");
password.setText(p.toCharArray(), 0, p.length());
String r = sharedPre.getString("router", "admin");
root.setText(r.toCharArray(), 0, r.length());
JPushInterface.setDebugMode(false);
JPushInterface.init(this);
}
示例10: onCreate
import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
@Override
public void onCreate() {
super.onCreate();
JPushInterface.setDebugMode(false);
JPushInterface.init(this);
FIR.init(this);
}
示例11: onCreate
import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
@Override
public void onCreate() {
Log.d(TAG, "onCreate");
super.onCreate();
JPushInterface.setDebugMode(true); //設置開啟日誌,發布時請關閉日誌
JPushInterface.init(this); // 初始化 JPush
}
示例12: onCreate
import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
@Override
public void onCreate() {
super.onCreate();
mApplicationContext = this;
mRefWatcher = LeakCanary.install(this);
JPushInterface.setDebugMode(true); // 設置開啟日誌,發布時請關閉日誌
JPushInterface.init(this); // 初始化 JPush
}
示例13: jPush
import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
/**
* 此方法完成了初始化JPush SDK等功能 但仍需在MainActivity的onResume和onPause添加相應方法
* JPushInterface.onResume(context); JPushInterface.onPause(context);
*
* @param context
*/
public void jPush() {
// 設置JPush調試模式
JPushInterface.setDebugMode(true);
// 初始化JPushSDK
JPushInterface.init(context);
}
示例14: init
import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
private void init() {
JPushInterface.setDebugMode(true);
JPushInterface.init(this);
//權限申請
if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)
!= PackageManager.PERMISSION_GRANTED) {
//申請WRITE_EXTERNAL_STORAGE權限
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 0);
}
//
//檢查更新
Update update = new Update(context);
update.checkUpdate();
//
//創建/讀取數據庫
SQLiteDatabase db = openOrCreateDatabase("tachi.db", MODE_PRIVATE, null);
db.execSQL("create table if not exists user (id integer primary key autoincrement, user text not null , password text not null )");
db.execSQL("create table if not exists data (id integer primary key autoincrement, site text not null , mail text not null , user text not null, pass text not null, other text not null )");
db.close();
//
//檢查自動備份
autobackup();
//
//登錄判斷
preferences = getSharedPreferences("logined", MODE_PRIVATE);
String name = preferences.getString("logined", "");
if (Objects.equals(name, "")) {
fm.beginTransaction().replace(R.id.id_content, login).commit();
} else {
fm.beginTransaction().replace(R.id.id_content, query).commit();
}
//
}
示例15: onCreate
import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
@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());
}