Created
September 5, 2018 07:50
-
-
Save DanishAmjad12/e27c866f16b18dce65c3c7945a3ec9a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AlarmJobIntentService : JobIntentService() { | |
override fun onHandleWork(intent: Intent) { | |
/* your code here */ | |
/* reset the alarm */ | |
// Util.showDebugLog("setAlarmCtx", "started Bottom") | |
AlarmReceiver.setAlarm(false) | |
stopSelf() | |
} | |
companion object { | |
/* Give the Job a Unique Id */ | |
private val JOB_ID = 1000 | |
fun enqueueWork(ctx: Context, intent: Intent) { | |
JobIntentService.enqueueWork(ctx, MyFcmListenerService::class.java, JOB_ID, intent) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment