mirror of
https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background
synced 2025-12-15 19:03:31 +00:00
Add hidden flag - Fixes #224
This commit is contained in:
@@ -165,9 +165,12 @@ public class ForegroundService extends Service {
|
||||
.setContentTitle(title)
|
||||
.setContentText(text)
|
||||
.setOngoing(true)
|
||||
.setPriority(Notification.PRIORITY_MIN)
|
||||
.setSmallIcon(getIconResId(settings));
|
||||
|
||||
if (settings.optBoolean("hidden", true)) {
|
||||
notification.setPriority(Notification.PRIORITY_MIN);
|
||||
}
|
||||
|
||||
if (bigText || text.contains("\n")) {
|
||||
notification.setStyle(
|
||||
new Notification.BigTextStyle().bigText(text));
|
||||
|
||||
Reference in New Issue
Block a user