我开发了一个作为启动器应用程序工作的应用程序。当用户从默认启动器中删除我的应用程序时,我需要知道它。
用户可以通过两种方式从默认启动器中删除我的应用程序:
1. Settings->Apps->Reset app preferences.
2. Settings->Apps->My_App->Clear default launcher.
如果有人有任何想法,请发表评论:
1. How I can detect my app is removed from the default launcher?
2. Is there any listener/action for it?
3. Is there any way by which I can restrict/block clearing default launcher?
提前致谢!
在Android 10中,一些制造商在电池优化设置中提供了新功能(见图)。当屏幕关闭一段时间后,我的前台服务被操作系统杀死。
我已经使用了带通知的前台服务。当所有设备的屏幕都打开时,此代码可以正常工作。我在 OnePlus 和 realMe 设备中面临这个问题,两者都有 Android 10 操作系统。
我想知道,有什么办法可以解决这个问题吗?有什么方法可以知道我的设备是否有这种设置?
感谢帮助!