I'm trying to make an android alarm app that only turns off when completing a task. I tried using an activity that was turned on for the user to do the task when it was time for the alarm. The problem is that when I use the taskmanager to kill the activity, my alarm clock goes off, I'm thinking of using overlay, but the permissions on the different devices sometimes do not work as expected (I tried running The android is good, but not on xiaomi. Can anybody give me ideas on how to handle this problem?
Asked
Active
Viewed 41 times
0
-
You can use services in android it will run in the background even if your app is killed from taskbar – Akshay Katariya Apr 19 '18 at 04:59
-
please add your code – hasan_shaikh Apr 19 '18 at 04:59
-
Refer this to create a service https://stackoverflow.com/a/48047584/4762767 – Akshay Katariya Apr 19 '18 at 05:00
-
you can't make non-killable app. If the user wants to kill 3rd-party app, he should be able to. – Vladyslav Matviienko Apr 19 '18 at 05:41
-
I handled the service to play ringtones, but what do I do with displaying tasks (games or something else) ? – vương Thong Apr 19 '18 at 06:51