Android 跨进程SharedPreferences异常详解
程序员文章站
2023-12-05 22:16:46
android 跨进程sharedpreferences异常详解
context c = null;
try {
c = context....
android 跨进程sharedpreferences异常详解
context c = null; try { c = context.createpackagecontext(preference_package, context.context_ignore_security); } catch (namenotfoundexception e) { e.printstacktrace(); } if (c != null) { sharedpreferences infosp = c.getsharedpreferences(preference_name, context.mode_multi_process); int status = infosp.getint("break", 1); logcat.d("br" + status); return 0 == status; } else { logcat.w("brake_status error.... c==null "); } return false;
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!