Android APP 开机启动速度慢的问题

Android App 可以通过监听系统的启动通知来得知系统已启动。在这时就可以启动自己的activity。

有时监听到的通知会比较慢,可以设置一个 priority 来更早的获取这个通知。如下:

        <receiver
            android:name=".BootCompletedReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter android:priority="2000">
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </receiver>
            

 

posted @ 2022-01-18 18:55  shenyinabcd  阅读(426)  评论(0)    收藏  举报