Code example for Intent

Methods: getService

0
 
			int interval = Integer.parseInt(
					this.appSettings.getString("autoSyncInterval", "1800000"),
					10); 
 
			this.alarmIntent = PendingIntent.getService(appInst, 0, new Intent(
					this, SyncService.class), 0);
			alarmManager.setRepeating(AlarmManager.RTC,
					System.currentTimeMillis() + interval, interval,
					alarmIntent);
 
			this.alarmScheduled = true;
		} 
	} 
 
	private void unsetAlarm() { 
		if (this.alarmScheduled) {
			this.alarmManager.cancel(this.alarmIntent);
			this.alarmScheduled = false;
		} 
Experience pair programming with AI  Get Codota for Java