So I have an app and I want it to run immediately whenever device got rebooted. To achieve this I added home category to MainActivity.
<category android:name="android.intent.category.HOME" />
After I reboot the device app will run directly. But when I first time click home button to go back to default home screen, nothing happens. Need to click home button again and device will act normally . Then from now on home button works fine until I reboot the device again.
I've checked the log and found out that on first time click home button nothing is triggered. And from second time click ActivityManager will start to work and call com.android.launcher3
Does anyone have any ideas why this weird situation happens?
Note:
When I checked the log I found out one line might be useful so I'll post it here. Not sure what is this mean though:
I/PowerHAL: Don't support interaction_button in normal mode
I know there is another work around for RECEIVE_BOOT_COMPLETED. But then device will wait a few seconds on home screen to trigger broadcast receiver. Based on my requirement I can not use this solution. Thanks in advance if you suggest me this solution but please help for my current question.