Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Mar 14th, 2018 57 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. private void startAlarm() {
  2.         AlarmManager alarm = (AlarmManager) this.getSystemService(Context.ALARM_SERVICE);
  3.         SharedPreferences prefs = this.getSharedPreferences("Prefs", MODE_WORLD_READABLE);
  4.         int i = prefs.getInt("UpdateFrequency", 1);
  5.         UpdateFrequency freq = UpdateFrequency.getIt(i);
  6.         int interval = freq.getConstantValue();
  7.        
  8.         alarm.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime() + 600000, interval,
  9.                 PendingIntent.getService(this, 999, new Intent(this, ContactUpdaterService.class), PendingIntent.FLAG_UPDATE_CURRENT));
  10.        
  11.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top