forked from Github/cordova-plugin-run-in-background
Option to turn off notification timer
Android notifications have a "how long ago was this notification set" timer. Now there's an option to turn that off (the default is true, so it's shown, matching current behavior).
This commit is contained in:
@@ -199,7 +199,8 @@ public class ForegroundService extends Service {
|
||||
.setContentTitle(title)
|
||||
.setContentText(text)
|
||||
.setOngoing(true)
|
||||
.setSmallIcon(getIconResId(settings));
|
||||
.setSmallIcon(getIconResId(settings))
|
||||
.setShowWhen(settings.optBoolean("showWhen", true));
|
||||
|
||||
if (!subText.equals("")) {
|
||||
notification.setSubText(subText);
|
||||
|
||||
Reference in New Issue
Block a user