1 Introduction
In the 9.0 system rom customization development, in the framework customization function development, in the built-in app, sometimes the function of the third-party app will be required to be activated after the system is turned on, so it is necessary to monitor the broadcast completed after the startup , and then start the third-party app, and then you need to monitor the broadcast process completed after booting in the system class to realize the function
2. The system starts the core class of the third-party app automatically
framework/base/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
3. Analysis and realization of the core functions of the third-party app from the system startup
After the startup is complete, the first page entered is the startup lock screen page, which is
KeyguardUpdateMonitor.java, so you can listen to the broadcast of the startup completion here, and then
set and start the third-party app after listening to the startup completion broadcast.
@VisibleForTesting
protected final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
if (DEBUG) Log.d(TAG, "received broadcast " + action);
if (Intent.ACTION_TIME_TICK.equals(action)