Code example for AlarmManager

Methods: setInexactRepeating

        // that will trigger once the minimum time between passive updates has 
        // expired. This is potentially more expensive 
        // than simple passive alarms, however the Receiver will ensure we've 
        // transitioned beyond the minimum time and 
        // distance before initiating a background nearby loction update. 
                System.currentTimeMillis() + minTime, minDistance, pendingIntent);
Contextual code suggestions in your IDE  Get Codota for Java