in my case i have to do a task lets say every 5 min in next 3hour. Which one would be better AlarmManger or Timer. In case of AlarmManger i will be starting an intent service which will do the task and in later one i will use TimerTask. Moreover how will get pending intent to use AlarmManager.cancel(pendingIntent) in intentService onHandleIntent.
possible copy of this, but have different scenario. Timer Task VS Alarm Manager usage in Android Service
Thanks.