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;
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
如对本文有疑问, 点击进行留言回复!!
Error running app: Default Activity Not Found
如何用HMS Nearby Service给自己的App添加近距离数据传输功能
BlockChain:2020年7月10日世界人工智能大会WAIC《链智未来 赋能产业区块链主题论坛》(四)
网友评论