[Background Location Plugin] Extensible Configuration License Key Setup

Forge Component
(4)
Published on 2017-11-27 by Alexandre Costa
4 votes
Published on 2017-11-27 by Alexandre Costa

Hello, Alexandre

I'm using OS11 to develop a mobile app that also uses a background location plugin from the Transistorsoft depository. I have everything running and working properly in DEV and TST environments. The gps coordinates of the user are saved and updated upon activity motion detection.

However, whenever I start the plugin I get the License Validation Failure Message. I've been trying to get the license configuration right for some time now, but I might be missing something. I don't know if it's because I'm using it on a debug compilation, even when using the right configuration and key...

I have the following format for my Extensible Configurations plugin module:

{
    "plugin": {
        "url": "https://github.com/transistorsoft/cordova-background-geolocation-lt#3.2.2"
    },
    "preferences": {
        "android": [
            {
                "name": "com.transistorsoft.locationmanager.license",
                "value": "myLicense"
            }
        ]
    }
}

But I've also tried with:

{
    "plugin": {
        "url": "https://github.com/transistorsoft/cordova-background-geolocation-lt#3.2.2",
        "variables": [
            {
                "name": "com.transistorsoft.locationmanager.license",
                "value": "myLicense"
            }
        ]
    }
}

Please let me know if you ran into a similar scenario, and if positive, how you approached it.

Best regards,

Sam

Solution

Hello, for now, the only way I solved this for the version of the plugin 3.0 or higher is forking the plugin in Github to my account and after that, I change the file plugin.xml adding the code below:

I know that this solution isn't perfect and I'm trying to discover how can I change the AndroidManifest.xml from Extensibility Configuration.

After this, don't forget to change the address of the plugin for your address.


Please let me know if this works for you. 

Solution

Hi, Alexandre

The method you described did indeed work for me. It's rather odd to be unable to access the AndroidManifest.xml configurations from the Extensible Configurations of the plugin's module. The same goes for whatever usage description you are now obliged to add for iOS platforms user permissions and data privacy.

Thank you for your time.

Sam