604
Views
21
Comments
Solved
[Background Location Plugin] How to get Background Location Plugin to work?
Question
background-location-plugin
Mobile icon
Forge asset by Alexandre Costa

Hi,

Newbie here.

I want to use the Background Location plugin for an app I am developing, but I can't even get the Background Location Sample App to run on my iPhone 6. Immediately after starting the app it displays an error "Background location plugin not available!".

I published the Background Location plugin, then I refreshed the dependencies of the Background Location Sample app and published it. When I scan the QR-code with Outsystems Now on my phone, the sample app starts, but then shows the error.

What am am I doing wrong? What else should I do to get the sample app running on my phone?


2023-12-07 07-51-40
Remco Dekkinga
 
MVP
Solution

Hi Frans,

This plugin is a a 3rd party plugin which is not supported by Outsystems Now.

In order to use this plugin you have to create your own native app, you can't use Outsystems Now for this.

Kind regards,

Remco Dekkinga

2021-10-11 16-59-13
António Barroso

Hi Remko,

thank you for you your reply.

I'm having the same problem Frans has. I can't put the sample app to work. 

When you say that it is not supported with outsystems now and "have to create your own native app", you say that you need to create a mobile app in service studio and then generate a native app? I did that but i don't get any return. 


best regards

Antonio Barroso


2012-08-04 21-41-02
Alexandre Costa

Hi Antonio, yest you need to generate your native app, or to test you can generate native app for sample app. OutSystems Now is app pre generated with some plugins that Outsystems integrate, any order plugin will be avaiable only when you build a native app, this is the moment when OutSystems Native Builder will copy your plugin or plugins to an app.

2021-10-11 16-59-13
António Barroso

Hi Alexandre


Like i said, i have generated a native app for the sample app, i run-it on my mobile device but it doesn't work. No log, no locations, just two blank pages. What is missing?


best regards

2012-08-04 21-41-02
Alexandre Costa

Hello, Antonio, what platform (Android, iOS? When the application was started did the prompt appear asking for permission to access the GPS?

2021-10-11 16-59-13
António Barroso

Hollo Alexandre


I built the native app for android. 

No, there is no prompt asking for permission to use GPS when starting the application. 

When installing the apk file, the acess to GPS is one of the permissions the app needs, and i accepted the list

When running the application, during the loading screen, there is a "licenceValidationFailure" message. It disapears in a second, i just notice it now



2012-08-04 21-41-02
Alexandre Costa

Hi António thanks for your repply I saw problem. The plugin I used has a licensing for Android and it's free for iOS and I did not know. I'm going to change the font of the plugin to solve this problem. 

Another way for you to get the GPS monitoring feature would be to use my other Plugin BackgroundMode, this plugin keep your app running in background and you can use GPS plugin by OutSystems.

Plugin

https://www.outsystems.com/forge/component/1727/backgroundmode-plugin/

Demo

https://www.outsystems.com/forge/component/1728/backgroundmode-demo/



UserImage.jpg
Joerg Peters

Hi Alexandre,

I had the same issue with Android licensing. As an interim solution I used the socrates3 fork, but it is less comprehensive than the christocracy one. Do you have a rough time schedule for republishing the Background Location plugin?


Kind Regards

Joerg Peters


 

 

2021-10-11 16-59-13
António Barroso

Hi Alexandre

I will explore the other plugin

Thank you


best regards

António Barroso

2017-06-06 09-43-03
Frans Moquette

Hi Everyone,

Thanks for the quick replies! All very insightfull info. We're going to try the native app route.

For now, just one more question. How can you tell if a plugin works within the Outsystems Now app? For example, the Google Maps Mobile plugin is listed as not supported by Outsystems, but I have created an app with that plugin and it runs fine within Outsystems Now on my iPhone. So "not supported by Outsystems" and "not supported within Outsystems Now app" are two different things?

2012-08-04 21-41-02
Alexandre Costa

Hello Frans I think it's making a bit of mess, being supported by OutSystems Now means that when the OutSystems Now native app was generated the plugin was built-in during build and is available for use, eg camera access plugin, GPS, bar code reading and others. Having support from the OutSystems team is another matter, for example you mentioned Google Maps, in this case it is not a Cordova Plugin but a javascript component developed by the Outsystems Labs team and made available on Forge. When the component is officially supported you will see in red written SUPPORTED. I hope I have helped.

UserImage.jpg
Joerg Peters

Hi Alexandre,

have you made any progress yet on the background location plugin?


Kind Regards

Joerg

UserImage.jpg
Joerg Peters

Hi Alexandre,

I could get the plugin to work on Android using

{
    "plugin":
    {
        "url": "https://github.com/transistorsoft/cordova-background-geolocation-lt.git"
    },
    "preferences": {
        "android": [
            {
                "name": "cordova-background-geolocation-license",
                "value": "4bbb513c013111eae951647fd4f9e79f127fce6f7a00e9d327db9ea2a053a0df"
            }        
        ]
    }
}

in Extensibility Configurations and generating the apk using

com.transistorsoft.backgroundgeolocation.ionic

as App identifier.


I hope this helps some other people too. Could you eventually add the above to the documentation / description of the plugin?


Kind Regards

Joerg Peters 



2012-08-04 21-41-02
Alexandre Costa

Hi Joerg thanks for your help I will do the necessary modifications, but can you tell me about the license, who is the owner of the license? 

Joerg Peters wrote:

Hi Alexandre,

I could get the plugin to work on Android using

{
    "plugin":
    {
        "url": "https://github.com/transistorsoft/cordova-background-geolocation-lt.git"
    },
    "preferences": {
        "android": [
            {
                "name": "cordova-background-geolocation-license",
                "value": "4bbb513c013111eae951647fd4f9e79f127fce6f7a00e9d327db9ea2a053a0df"
            }        
        ]
    }
}

in Extensibility Configurations and generating the apk using

com.transistorsoft.backgroundgeolocation.ionic

as App identifier.


I hope this helps some other people too. Could you eventually add the above to the documentation / description of the plugin?


Kind Regards

Joerg Peters 





UserImage.jpg
Joerg Peters


Hi Alexandre,

No one is really owning this license.

Check https://github.com/transistorsoft/cordova-background-geolocation-lt  Building Android section of documentation. What I don't know is if there is any limitations in the functionality comparing to a commercially licensed version. I hope I can convince my company to purchase a license in any case.


Kind Regards

Joerg


2023-12-30 21-08-17
Artuur De Maeyer
 
MVP

Joerg Peters wrote:

Hi Alexandre,

I could get the plugin to work on Android using

{
    "plugin":
    {
        "url": "https://github.com/transistorsoft/cordova-background-geolocation-lt.git"
    },
    "preferences": {
        "android": [
            {
                "name": "cordova-background-geolocation-license",
                "value": "4bbb513c013111eae951647fd4f9e79f127fce6f7a00e9d327db9ea2a053a0df"
            }        
        ]
    }
}

in Extensibility Configurations and generating the apk using

com.transistorsoft.backgroundgeolocation.ionic

as App identifier.


I hope this helps some other people too. Could you eventually add the above to the documentation / description of the plugin?


Kind Regards

Joerg Peters 



I tried your workaround to get rid of the 'License Validation Failure' error. It's not working yet, so I wanted to make sure I understood you correctly. What do you mean by 'generating the apk'? Generating a mobile app for the plugin and downloading it (which is an apk file)?

Thanks,

Artuur 


UserImage.jpg
Chris Scott

I am the creator of Cordova Background Geolocation.

@Alexandre Costa You should never recommend the cordova-plugin-background-mode plugin:  That plugin is toxic.  You're pretty much 100% guaranteed to be rejected by Apple with that plugin.  Search that plugin's issues for "Apple":  Nothing but tears.

That plugin achieves its "magic" by requesting the "background audio" capability.  If you're making a Music Player app, that's fine.  If not, REJECTED.

If anyone has any questions about licensing, you can ask me directly.

UserImage.jpg
vasu sree

Valuable information! Looking forward to seeing your notes posted. Thank you for sharing the nice article. Good to see your article.  fastpokemap

UserImage.jpg
Chris Scott

@Alexandre Costa.

You misunderstand.  

I am the creator of cordova-background-geolocation.  I highly recommend this plugin.  It follows Apple best-practices for background operation :)

I am not the creator of cordova-plugin-background-mode.  It is that plugin which I referenced as toxic and to be avoided.

2025-10-21 13-42-45
Alexandre Costa

Chris Scott wrote:

@Alexandre Costa.

You misunderstand.  

I am the creator of cordova-background-geolocation.  I highly recommend this plugin.  It follows Apple best-practices for background operation :)

I am not the creator of cordova-plugin-background-mode.  It is that plugin which I referenced as toxic and to be avoided.

Thanks @Chris Scott I really got confused, now it's clear, I'm using the correct one, yours (kkk). You could put a special license price for OutSystems customers who want to use your component what do you think?

UserImage.jpg
Jo Malone

Thank you for your input. ????????????????

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