Libraryless. Click here for Pure Java version (57L/1K/2K).
!752 import android.app.*; import android.content.*; p { Activity context = androidContext(); AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); Class receiverClass = Class.forName("de.tinybrain.javax_allperms.AlarmManagerReceiver"); Intent intent = new Intent(context, receiverClass); PendingIntent pi = PendingIntent.getBroadcast(context, 0, intent, 0); int firstDelayMS = 1000*5, intervalMS = 1000*10; am.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis()+firstDelayMS, intervalMS, pi); }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, crvwmplrxojx, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004166 |
Snippet name: | Android: Try to set repeating alarm |
Eternal ID of this version: | #1004166/1 |
Text MD5: | 04ad5d14c97c5de6db890b6adbd2bebf |
Transpilation MD5: | 8d4b5fe942a578e0ea0cdaeb5bcb98fb |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-08-08 22:28:06 |
Source code size: | 581 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 495 / 539 |
Referenced in: | [show references] |