sbr1308
sbr1308

Reputation: 57

Custom Launcher is not remaining as default launcher in Huawei device

I have developed a custom launcher/homescreen and it has been working perfectly on all android version for nearly two years. So far this launcher has been used in various Samsung devices.

Currently I am testing it in new huawei lua-u22 device. My launcher runs, can be set as default and shows up other apps on top of launcher too. But if I run another app (for example Gmail), screen lock(Swipe only) for 20-30 second, unlock device then press back button then instead of bringing it back to my launcher it goes back to default huawei homescreen. I checked by going to the settings-> home and there my launcher was still set as default. It only brings back my launcher home screen when I press home button again.

Is this problem of huawei device that is always redrawing default huwaei home as homescreen? Is there anyway I can track default selected home change at any time?

Upvotes: 1

Views: 3016

Answers (1)

sbr1308
sbr1308

Reputation: 57

I found out the reason. In huawei after screen is tuned off my app was getting killed.

Huawei has a feature Protected Apps which allows application that is enabled in the list to keep running when screen is turned off. After I allowed my app in Protected apps it was not getting killed after screen turned off and everything now working properly.

To enable this feature go to System settings (which you can either find in the quick toggles portion of the notification shade by pulling down the status bar on the top portion of the screen). Go to All tab, Scroll down to Privacy and Security section, go to to Protected Apps and enable your app(this will control what’s allowed to run when the screen is off and what isn’t)

In stackoverflow there are few codes available to run this screen pro-grammatically which I do not find reliable enough as it may change in any new version of device.

Upvotes: 2

Related Questions