Code example for PowerManager.WakeLock

Methods: release

0
            } else { 
                /* cancelled, likely due to lost network - we'll get restarted 
                 * when network comes back */ 
            } 
 
            mWakeLock.release();
            stopSelf();
        } 
    } 
 
    private void notifyNewGpsData() { 
        Intent intent = new Intent(ACTION_NEW_GPS_DATA);
        sendStickyBroadcast(intent);
    } 
 
    private PendingIntent scheduleNextDownload(long lastDownload) {
        AlarmManager am = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
        Intent intent = new Intent(this, LtoService.class);
        PendingIntent pi = PendingIntent.getService(this, 0, intent,
                PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT);