service automatically stops after several minutes
问题 I'm creating a service which should work when the activity is in background as well as when the whole application is destroyed. I'm calling location coordinates in the service at every 1 minute interval. However, when I try to do so, the service shuts down automatically just after 12-15 minutes. I want the service to work endlessly until and unless it is destroyed by the completion of activity on user interaction. My service class is as follows: public class SensorService extends Service {