Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (isCharging || isUnknown) {
- jobScheduler.schedule(jobInfo(context))
- } else if (hasBeenDisconnected) {
- jobScheduler.cancelAll()
- // FIXME this is a pretty hacky way of getting the job done :(
- (context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager)
- .cancel(NOTIFICATION_ID)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement