I am trying to create a basic app that simply turns on at 8:00 AM every weekday and checks GPS every 5 minutes until 8:55 AM at which the service would stop until 8:00 AM the next weekday. What is the best way to do this? I was thinking having a AlarmManager that would start a service that would set another AlarmManger for 5 minutes. When that alarmmanger launches the GPSService the GPSService would do it's thing and then set yet another alarmmanger to launch itself in 5 minutes until it calculates that it is pas 8:55 and simply not set another alarmmanager. But this can't be an efficient or best practice so any advice (preferably with code samples!) would be much appreciated.
Thanks. :)