Android service for alarms

121 Views Asked by At

I am pretty new to Android and just started learning some concepts. I am trying to create an alarm clock for which im using my service class to initiate the alarm. But when I set the alarm time and have my app running in the background then I get the alarm triggered. At the same time, when I set the time and close my app(long press home button and swipe to close apps), I don't get the alarm triggered for the specific time that I had set earlier. Now I tried all possible ways to search the same question in this forum and I did get some few answers which did not solve my problem. Also I tried searching on github as well.. Tried them but no luck. I am not posting my code because it's just so a simple one that I had made as an example to understand service. Basically I wanted to know how the stock alarm clock in Android works and how is it triggering the alarm even if I set the time and close the app. Also what's the difference between start sticky method and start not sticky method? A simple with no complex terms definition will be appreciated. Could someone tell me properly how am I to proceed with this? Also a small tutorial would be appreciated. Thanks to every buddy here in advance.

0

There are 0 best solutions below