I'm curious if it's possible to create an Application on data partition (This application will be downloaded from Google PlayStore) to 'auto' launch once user has plugged in the device to the power outlet.
I did some digging and notice that we can listen to this broadcast:
<receiver android:name=".broadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.ACTION_POWER_CONNECTED"/>
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
</intent-filter>
</receiver>
Is it possible to listen to this broadcast and get launched once user has plugged in the device to a power outlet?
Will Google let us do this?
I am trying to target API 29 on Android 10.