Manuel Menéndez Román
Posts: 0
Joined: Sat Jun 22, 2013 9:12 am

Geolocation not working on phone

Hello,
I have a page that geolocates the user and prints its coordenates. The on success of the geolocation service, it shows a list of items. It works via web on chrome, explorer, firefox and safari, but when I export the .apk to my phone, it doesn't work.

This is a screen capture of the page on any web browser:
Image

On my android phone the coordinates are empty and the geolocation service is never invoked successfully so the list is not shown.

The permissions I've set in my app settings include:
ACCESS_COARSE_LOCATION
ACCESS_FINE_LOCATION
ACCESS_LOCATION_EXTRA_COMMANDS

What can be wrong?
Thanks

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

Geolocation not working on phone

Hi Manuel,

There are several ways to get coordinates of the user's position.

Those that run on a desktop browser usually do not work on mobile devices and vice versa.

If your application is running on the desktop browser then you are not using Device Service Geolocation.

To read more: http://docs.appery.io/tutorials/build...

Manuel Menéndez Román
Posts: 0
Joined: Sat Jun 22, 2013 9:12 am

Geolocation not working on phone

Hi,
I think I'm doing just as the tutorial.

This is my device service:
Image

This is the mapping:
Image

And here I invoke it:
Image

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

Geolocation not working on phone

Hi Manuel,

Please try using Page Show event and let us know about the result.

Manuel Menéndez Román
Posts: 0
Joined: Sat Jun 22, 2013 9:12 am

Geolocation not working on phone

I already tried that and it doesn't work. I've also set an event on fail for the geolocation service, to send an alert, and it is in fact failing:

Image

Image

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

Geolocation not working on phone

Is location enabled on your device?

Manuel Menéndez Román
Posts: 0
Joined: Sat Jun 22, 2013 9:12 am

Geolocation not working on phone

That was it. I should have know from the beggining. But other apps request to enable location when needed. How can I do this from my app?

Thanks

Manuel Menéndez Román
Posts: 0
Joined: Sat Jun 22, 2013 9:12 am

Geolocation not working on phone

Wait, testing on another device I get the error even when location is enabled:
Image

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Geolocation not working on phone

Hi Manuel, have you any error messages in console (logcat)?

Luca
Posts: 0
Joined: Tue Mar 11, 2014 7:02 pm

Geolocation not working on phone

I have same problem!

Any support please?

Thanks

Return to “Issues”