Skip to content

Commit

Permalink
Remove notification
Browse files Browse the repository at this point in the history
  • Loading branch information
mike committed Oct 29, 2019
1 parent 1417f4f commit 22d08f5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class LocationUpdatesService : Service() {
mNotificationManager!!.createNotificationChannel(mChannel)
}

startForeground(NOTIFICATION_ID, notification)
//startForeground(NOTIFICATION_ID, notification)


broadcastReceiver = object : BroadcastReceiver() {
Expand Down Expand Up @@ -138,7 +138,7 @@ class LocationUpdatesService : Service() {
Utils.setRequestingLocationUpdates(this, false)
mNotificationManager!!.cancel(NOTIFICATION_ID)
stopSelf()
stopForeground(true)
//stopForeground(true)
} catch (unlikely: SecurityException) {
Utils.setRequestingLocationUpdates(this, true)
}
Expand Down

1 comment on commit 22d08f5

@j05u3
Copy link

@j05u3 j05u3 commented on 22d08f5 Feb 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sorry, just wanted to ask why you removed the notification, because the notification is what makes this service a foreground service (which are not killed by the android os).

Please sign in to comment.