HTML5 + PHP + JS for android

Asked

Viewed 144 times

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?

  • Yes, no mistake.... neither in xdk nor in Ionic

  • 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 , 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

  • 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

  • php works only on the server, try sending php to a server, and calling by ajax should solve the problem.

  • Maybe you’ll have to use Phonegap’s own API or XDK for this

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.