diff --git a/config.xml b/config.xml index a5eb4c297..cdc0b199d 100644 --- a/config.xml +++ b/config.xml @@ -59,6 +59,22 @@ + + + + + + + + + + + + + + + + diff --git a/hooks/after_prepare/030_android_splash.js b/hooks/after_prepare/030_android_splash.js deleted file mode 100755 index 26c1d64f3..000000000 --- a/hooks/after_prepare/030_android_splash.js +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env node - -// This hook copies Android splash screen files from dev directories into the appropriate platform specific location. -// The code was extracted from here: http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/ - -var filesToCopy = [{ - 'resources/android/splash/drawable-land-hdpi-screen.png': 'platforms/android/app/src/main/res/drawable-land-hdpi/screen.png' - }, { - 'resources/android/splash/drawable-land-ldpi-screen.png': 'platforms/android/app/src/main/res/drawable-land-ldpi/screen.png' - }, { - 'resources/android/splash/drawable-land-mdpi-screen.png': 'platforms/android/app/src/main/res/drawable-land-mdpi/screen.png' - }, { - 'resources/android/splash/drawable-land-xhdpi-screen.png': 'platforms/android/app/src/main/res/drawable-land-xhdpi/screen.png' - }, { - 'resources/android/splash/drawable-land-xxhdpi-screen.png': 'platforms/android/app/src/main/res/drawable-land-xxhdpi/screen.png' - }, { - 'resources/android/splash/drawable-land-xxxhdpi-screen.png': 'platforms/android/app/src/main/res/drawable-land-xxxhdpi/screen.png' - }, { - 'resources/android/splash/drawable-port-hdpi-screen.png': 'platforms/android/app/src/main/res/drawable-port-hdpi/screen.png' - }, { - 'resources/android/splash/drawable-port-ldpi-screen.png': 'platforms/android/app/src/main/res/drawable-port-ldpi/screen.png' - }, { - 'resources/android/splash/drawable-port-mdpi-screen.png': 'platforms/android/app/src/main/res/drawable-port-mdpi/screen.png' - }, { - 'resources/android/splash/drawable-port-xhdpi-screen.png': 'platforms/android/app/src/main/res/drawable-port-xhdpi/screen.png' - }, { - 'resources/android/splash/drawable-port-xxhdpi-screen.png': 'platforms/android/app/src/main/res/drawable-port-xxhdpi/screen.png' - }, { - 'resources/android/splash/drawable-port-xxxhdpi-screen.png': 'platforms/android/app/src/main/res/drawable-port-xxxhdpi/screen.png' - } -]; - -var fs = require('fs'); -var path = require('path'); - -// no need to configure below -var rootDir = process.argv[2]; - -filesToCopy.forEach(function(obj) { - Object.keys(obj).forEach(function(key) { - var val = obj[key]; - var srcFile = path.join(rootDir, key); - var destFile = path.join(rootDir, val); - var destDir = path.dirname(destFile); - if (fs.existsSync(srcFile) && fs.existsSync(destDir)) { - fs.createReadStream(srcFile).pipe(fs.createWriteStream(destFile)); - } - }); -}); diff --git a/resources/android/icon/drawable-hdpi-smallicon.png b/resources/android/icon/drawable-hdpi-smallicon.png new file mode 100644 index 000000000..5262dcb0f Binary files /dev/null and b/resources/android/icon/drawable-hdpi-smallicon.png differ diff --git a/resources/android/icon/drawable-ldpi-smallicon.png b/resources/android/icon/drawable-ldpi-smallicon.png new file mode 100644 index 000000000..3360a685b Binary files /dev/null and b/resources/android/icon/drawable-ldpi-smallicon.png differ diff --git a/resources/android/icon/drawable-mdpi-smallicon.png b/resources/android/icon/drawable-mdpi-smallicon.png new file mode 100644 index 000000000..c8df8f94d Binary files /dev/null and b/resources/android/icon/drawable-mdpi-smallicon.png differ diff --git a/resources/android/icon/drawable-xhdpi-smallicon.png b/resources/android/icon/drawable-xhdpi-smallicon.png new file mode 100644 index 000000000..28081d204 Binary files /dev/null and b/resources/android/icon/drawable-xhdpi-smallicon.png differ diff --git a/src/addon/pushnotifications/providers/pushnotifications.ts b/src/addon/pushnotifications/providers/pushnotifications.ts index cc36a99a5..fce797a79 100644 --- a/src/addon/pushnotifications/providers/pushnotifications.ts +++ b/src/addon/pushnotifications/providers/pushnotifications.ts @@ -95,7 +95,8 @@ export class AddonPushNotificationsProvider { return { android: { senderID: CoreConfigConstants.gcmpn, - sound: !!soundEnabled + sound: !!soundEnabled, + icon: 'smallicon' }, ios: { alert: 'true', diff --git a/src/providers/local-notifications.ts b/src/providers/local-notifications.ts index 877ee7d48..40cfc3926 100644 --- a/src/providers/local-notifications.ts +++ b/src/providers/local-notifications.ts @@ -448,7 +448,7 @@ export class CoreLocalNotificationsProvider { if (this.platform.is('android')) { notification.icon = notification.icon || 'res://icon'; - notification.smallIcon = notification.smallIcon || 'res://icon'; + notification.smallIcon = notification.smallIcon || 'res://smallicon'; const led: any = notification.led || {}; notification.led = {