From 69c097e351ddd5fa2d110d165d0ede049ca87ef6 Mon Sep 17 00:00:00 2001 From: "K. Shankari" Date: Sun, 5 Apr 2020 16:45:48 -0700 Subject: [PATCH] Change the class import script to work with the cordova 7+ + bump up plugin version number This is related to 716fd24dcc9b40c64e16ff646c265a65715d8de5 --- hooks/android/addResourcesClassImport.js | 2 +- plugin.xml | 3 ++- src/android/NotificationHelper.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hooks/android/addResourcesClassImport.js b/hooks/android/addResourcesClassImport.js index 61f3774..77ec351 100644 --- a/hooks/android/addResourcesClassImport.js +++ b/hooks/android/addResourcesClassImport.js @@ -66,7 +66,7 @@ module.exports = function (ctx) { path = ctx.requireCordovaModule('path'), Q = ctx.requireCordovaModule('q'); - var platformSourcesRoot = path.join(ctx.opts.projectRoot, 'platforms/android/src'); + var platformSourcesRoot = path.join(ctx.opts.projectRoot, 'platforms/android/app/src/main/java/'); var pluginSourcesRoot = path.join(ctx.opts.plugin.dir, 'src/android'); var androidPluginsData = JSON.parse(fs.readFileSync(path.join(ctx.opts.projectRoot, 'plugins', 'android.json'), 'utf8')); diff --git a/plugin.xml b/plugin.xml index 2b03405..7037704 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,7 +1,7 @@ + version="1.3.2"> UnifiedLogger Log messages from both native code and javacript. Since this is @@ -12,6 +12,7 @@ + diff --git a/src/android/NotificationHelper.java b/src/android/NotificationHelper.java index 84dcef4..30e2a3b 100644 --- a/src/android/NotificationHelper.java +++ b/src/android/NotificationHelper.java @@ -107,7 +107,7 @@ public static Notification.Builder getNotificationBuilderForApp(Context context, } else { builder = new Notification.Builder(context); } - Bitmap appIcon = BitmapFactory.decodeResource(context.getResources(), R.mipmap.icon); + Bitmap appIcon = BitmapFactory.decodeResource(context.getResources(), R.mipmap.ic_launcher); builder.setLargeIcon(appIcon); builder.setSmallIcon(R.drawable.ic_visibility_black); builder.setContentTitle(context.getString(R.string.app_name));