Add Android-specific options

Now the app can:
-Set the channel name and description
-Set the notification subtext
-Add a "Close" action to the notification, along with customizing the action text and icon

Fixed bugs:
-Icon is never used if it's in "drawable" rather than "mipmap"
-Used "Compat" library to make backwards compatibility easier
This commit is contained in:
Nathan Kerr
2019-02-04 11:18:34 -08:00
parent b5950b578d
commit 32de5cb848
11 changed files with 121 additions and 52 deletions

View File

@@ -382,14 +382,20 @@ exports._isActive = false;
* Default values of all available options.
*/
exports._defaults = {
title: 'App is running in background',
text: 'Doing heavy tasks.',
bigText: false,
resume: true,
silent: false,
hidden: true,
color: undefined,
icon: 'icon'
title: 'App is running in background',
text: 'Doing heavy tasks.',
subText: '',
bigText: false,
resume: true,
silent: false,
hidden: true,
color: undefined,
icon: 'icon',
channelName: 'cordova-plugin-background-mode',
channelDescription: 'cordova-plugin-background-moden notification',
allowClose: false,
closeIcon: 'power',
closeTitle: 'Close'
};
/**