17
Views
2
Comments
Trouble Connecting to WebEngage Service via Cordova Plugin
Application Type
Mobile

Hi All,


I am trying to create a WebEngage plugin for mobile by consuming git: WebEngage-cordova-plugin through extensibility configuration and was able to identify and validate the plugin. However I am not able to connect with the service and get the response. 

I managed to pass variables along with extensibility configuration with name and value as below

{"plugin": {"url": "https://github.com/WebEngage/cordova-plugin.git",

  "variables": [{"name": "com.webengage.sdk.android.key","value": "in~xxxxxxxx"}]}}

The documentation states that the `config.xml` file should be augmented with specific metadata containing names and values (such as the License Key - shown in the image).  How can we add the given elements inside config.xml during the build process?

Thanks in Advance



image_2024-01-25_184857923.png
2020-03-04 14-50-24
Armando Gomes

Hello Rashid,

My quick suggestion would be to check how the cordova-plugin-whitelist works and mimic the same behavior but for the configurations that you want to set.

Another option could be eventually using a cordova hook to manipulate the config.xml file before building.

Hope this helps!

2023-05-27 21-38-49
Rashid

Hello Armando,

Thanks for your suggestion! After considering both options, I've decided to go with editing the config.xml file explicitly. Please let me know if there is anything that I need to keep in mind before proceeding.

Thanks

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.