android开机自启动(开机向导页用户设置监听)

adb shell settings put secure user_setup_complete 1
adb shell settings put global device_provisioned 1
adb reboot

user_setu_complete

device_provisioned

https://blog.csdn.net/u010672559/article/details/89509762

https://www.cnblogs.com/programandriod/p/13868589.html

import android.database.ContentObserver;
mContext.getContentResolver().registerContentObserver(Settings.System.getUriFor("power_save_mode_state"), false, mXXXObserver);
private ContentObserver mXXXObserver=new ContentObserver(new Handler()) {
        public void onChange(boolean selfChange) {
            
        };
    };
mContext.getContentResolver().unregisterContentObserver(mXXXObserver);

getContentResolver().registerContentObserver(Settings.System.getUriFor(Settings.Global.DEVICE_PROVISIONED),true, null)//注册监听

posted @ 2021-06-27 09:48  FreeFunCode  阅读(1121)  评论(0编辑  收藏  举报