Kevin Preston
Posts: 0
Joined: Wed Oct 09, 2013 12:18 pm

Geolocation plugin problem

I don't think you can actually read the posts.
I do not want help on the plugin itself only on how to install it.
gepPluginTest2 is an 'empty' app - I was hoping that you could install the plugin so that I could see how it should be done.

geoPluginTest has the plugin installed by following the tutorial and adding the steps that aren't mentioned in it. This builds without errors but

codevar bgGeo = window.plugins.BackgroundGeoLocation; /code

returns undefined. This is as stated in my original post 6 days ago!

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Geolocation plugin problem

Hello Kevin,

Unfortunately we cannot add a plug-in to your app: http://devcenter.appery.io/support-po...

What additional steps did you add to your app?

Kevin Preston
Posts: 0
Joined: Wed Oct 09, 2013 12:18 pm

Geolocation plugin problem

Katya,
In an attempt to solve this problem I have been trying another app builder. This allows you to add plugins with just two lines in config.xml :-

code<gap:plugin name="org&#46;transistorsoft&#46;cordova&#46;background-geolocation" version="0&#46;2&#46;0" />/code
code<feature name="BackgroundGeoLocation"/>/code

Phonegap Build then adds the required files automatically, this also seems like the way to do it with Eclipse. This worked immediately and is much simpler than the Appery method. Are there any plans to implement this? I am assuming that you use Phonegap Build behind the scenes.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Geolocation plugin problem

Hello Kevin,

Thank you for sharing! Unfortunately we are not aware if there are any plans to implement this, but I can try to find out.

Kevin Preston
Posts: 0
Joined: Wed Oct 09, 2013 12:18 pm

Geolocation plugin problem

Evgene,
I have proved that the plugin is OK by installing it using another app builder.
So either I am still installing it incorrectly or there is something wrong with the Appery build process.
I have shared GeoPluginTest with support and would be grateful if you could look to see if the configuration is correct. If you build this app it builds without errors but when you look at window.plugins (on the device) the BackgroundGeoLocation object is not present.
The only change from the tutorial is the change to '4.1.1.4' here in pom.xml:-
code<dependency>
<groupId>com&#46;google&#46;android</groupId>
<artifactId>android</artifactId>
<version>4&#46;1&#46;1&#46;4</version>
<scope>provided</scope>
</dependency>/code
It will not build without this change.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Geolocation plugin problem

Hello Kevin,

Sorry for delay, here is how to activate the plugin:
1) the App settings-Android binary put Min. SDK version = 4.0 and Target SDK version = Android 4.2.x
2) see screenshot 1
3) see screenshot 2
4) download the java files (see screenshot 3)
5) see screenshot 4
6) add the file BackgroundGeoLocation.js (see screenshot 5). in the beginning of the file add line
precordova&#46;define("org&#46;transistorsoft&#46;cordova&#46;background-geolocation&#46;BackgroundGeoLocation", function(require, exports, module) {/pre
at the end of the file a line
pre});/pre
unfortunately, it is very hard to build it in Appery.io (it is possible in principle, but you need to connect several jar files). it is better to export this in Eclipse, and build there.
Image
Image
Image
Image
Image

Kevin Preston
Posts: 0
Joined: Wed Oct 09, 2013 12:18 pm

Geolocation plugin problem

Evgene,
Thanks,I will try your latest instructions.
It is a pity that it involves Eclipse and Phonegap Build when the main attraction of Appery is that it is supposed to remove this complexity.

Kevin

Kevin Preston
Posts: 0
Joined: Wed Oct 09, 2013 12:18 pm

Geolocation plugin problem

Evgene,
I don't think using Eclipse is really going to be an efficient solution to this. It makes it a very slow process and of course doesn't help with IOS, the removing of the complexities of Eclipse/phonegap build etc is one of the main attractions of products like Appery.
Can you explain what you mean by "it is very hard to build it in Appery.io (it is possible in principle, but you need to connect several jar files). " If it is not possible in Appery then I think I will reluctantly have to move to another app builder and lose the investment in time and money I have made already.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Geolocation plugin problem

Hello Kevin,

For IOS in Appery.io builder you cannot add plugins to it, you have to export in xCode and add plugins there. Most likely there is a possibility to add this plugin for Android, but we need more time to find out how. We'll get back to you with update.

Jerry7185911
Posts: 0
Joined: Thu Oct 23, 2014 9:18 pm

Geolocation plugin problem

Kevin - were you able to get this working in Appery? Is exporting necessary and is it accurate that once you modify in xCode or Eclipse, you can't go back to Appery?

Evgene - are there any plans to improve the background geolocation support for Appery?

thank you for any update you can provide.

Return to “Issues”