Turn on GPS

  

I was trying to create an option in my mobile application to enable the location service or open the location service settings. I tried using the diagnostic plug-in but it is creating an error while trying to generate the application. It show an error saying  "In Android on 2018-07-11 at 11:12:47 - Error installing Cordova plugin: cordova.plugins.diagnostic". can anybody tell me how to resolve this issue.  

Im adding an oml to my project below

Hello Charles,


So I took your OML, installed the DiagnosticPlugin on my Personal Environment and tried to generate a mobile application (Android) and I got the same error - which is nice!

On the ServiceCenter, when you "open" the app, you'll have the Native Platforms tab. There, you will have access to the App Generation Log for each platform - if applicable.

The Stack Trace log is this:

Error: SyntaxError: Unexpected number
    at Object.parse (native)
    at module.exports (/opt/NativeBuilder/builds/e2a49389-dda0-4466-be1b-73eaaf7847f4/source/plugins/cordova.plugins.diagnostic/scripts/addPermissions.js:22:28)
    at runScriptViaModuleLoader (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:187:18)
    at runScript (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:165:16)
    at /usr/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:133:20
    at _fulfilled (/usr/lib/node_modules/cordova/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/lib/node_modules/cordova/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/lib/node_modules/cordova/node_modules/q/q.js:749:13)
    at /usr/lib/node_modules/cordova/node_modules/q/q.js:810:14
    at flush (/usr/lib/node_modules/cordova/node_modules/q/q.js:108:17)


With this in mind, I've changed the plugin endpoint to the latest version on the "original" github repository - since the referenced one is a fork, 126 commits behind. And still got an error - a different one, though.


I can't really help much right now but why are you not looking at the Location Plugin, by OutSystems R&D?


Cheers