SharedPreferences 跨进程共享
进程a
private int mode = Context.MODE_WORLD_READABLE;
SharedPreferences setting = mContext.getSharedPreferences("smartsetting", mode);
进程b
try {
Context useCount = createPackageContext("com.android.settings", Context.CONTEXT_IGNORE_SECURITY);
smartsetting = useCount.getSharedPreferences("smartsetting", Context.MODE_MULTI_PROCESS);
} catch (NameNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}