0
I have a page in html + js+ php that uses Navigator.Geolocation, works perfectly in the browser, however, I am doing some tests and would like to "transform" this page to an apk
I used xdk and Ionic, but when the apk is built it seems that the JS function does not work or the same can not access the GPS device, even working in the browser.
Someone has a solution to this ?
Grateful.
Already tested in the intel-xdk "Debug" tab to see if there is an error?
– André Vicente
Yes, no mistake.... neither in xdk nor in Ionic
– Roberto José
Did you add the Cordova-plugin-Geolocation? plugin and did you add it by hand or by xdk? when add by xdk it already puts the permissions you need, check if they are set.
– André Vicente
@Andrévicente , I added by xdk, the code I use to get the location is very similar to this one http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_geolocation
– Roberto José
php does not work within the application, Ionic, phonegap, xdk, so read js, html and css, what you can do is search Geolocation plugin for Ionic
– R. Valim
php works only on the server, try sending php to a server, and calling by ajax should solve the problem.
– Murilo Souza
Maybe you’ll have to use Phonegap’s own API or XDK for this
– Lai32290