Search code examples
hybrid-mobile-app

How to make customization in cordova plugin?


I want to do customization in push-notification plugin.

I have installed different push-notification plugins but doesn't works:

https://www.npmjs.com/package/cordova-plugin-push-notification

https://github.com/phonegap/phonegap-plugin-push

https://pushwoosh.gitbook.io/platform-docs/pushwoosh-sdk/cross-platform-frameworks/cordova/integrating-cordova-plugin

(For Phonegap: phonegap plugin add pushwoosh-pgb-plugin

For Cordova: cordova plugin add pushwoosh-cordova-plugin)

Actual results: Image is not showing in push-notifications.

Expected result: Image should be there while receiving push-notifications


Solution

  • You can do customization in Plugin using "PluginName".java file.

    You may find the "PluginName".java from

    (Project Folder)Root -> Platform -> android (os name) -> app -> src -> main -> java -> [plugin package] -> "PluginName".java file

    Now you have to do your own code as per the requirement. Just like your problem of image in push-notification, you can do appreciate code for showing images in this file.