Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
17060 Discussions

Geolocation out of order

Jochen_M_
Beginner
1,865 Views

Hello,

I am developing some apps using Geolocation at the moment. Some days ago everything worked fine. It still works fine in the emulator, but when I build my app oder use App Preview, it doesn´t work anymore. I also tried it with source code that I didn´t change for a month, it doesn´t work here, too. The "Geolocation" plugin is selected. It would be great if you could fix that problem.

Yours,
Jochen M.​

0 Kudos
12 Replies
John_H_Intel2
Employee
1,865 Views

I am pretty sure we didnt change anything. I have a generic app that I tested geolocation with and it worked as it should.

Is it possible that your device got an update? Do you have a different device to test with?

0 Kudos
Jochen_M_
Beginner
1,865 Views

Hi John,

I have two developer PCs and two test devices. On my Windows 10 machine I installed XDK 2366 these days. On my Windows 8.1 there´s still XDK 2248 installed. I tried it on both machines, it doesn´t work on both anymore. I tried it on my Android Tablet (v5.11) and my iPad 2 mini (iOS 8.4). It doesn´t work in App Preview anymore and when I build my apps for Android, it doesn´t work, too. In App Preview there´s a demo section, I tried to run the Geolocation example app on both Tablets and on both, App preview crashes.


navigator.geolocation.getCurrentPosition --> worked fine until some days or weeks ago, but still works in the emulator
intel.xdk.geolocation.getCurrentPosition --> never worked for me, but works fine in the emulator

Yours,
Jochen M.​

0 Kudos
John_H_Intel2
Employee
1,865 Views

The intel.xdk.geolocation plugin is depricated and you should not use it. The Cordova plugin works for me.

Can you provide a simple example that does not work for you?

0 Kudos
John_H_Intel2
Employee
1,865 Views

Also, can you attach your projects .xdk file?

And the apk in question?

0 Kudos
John_H_Intel2
Employee
1,865 Views

One more thing, did you update you device last week to 5.1.1?

Are you positive the geolocation is enabled on the device?

0 Kudos
Jochen_M_
Beginner
1,865 Views

Here comes the example. It works in my emulator but not on my devices.

0 Kudos
Jochen_M_
Beginner
1,865 Views

See attachment (project files + .APK).

I updated to Android 5.1.1 last week or some days earlier, but not long ago. Geolocation is enabled. The final Apps I built before, are working fine on my tablet (installed as .APK on my tablet for weeks).

Thank you!

0 Kudos
John_H_Intel2
Employee
1,865 Views

I installed your apk on a 4.4.2 and a 5.0 androids. Both displayed the lat/long coords.

Have you tried rebooting your device?

Do other apps that use geolocation work on the device?

At this point I am going to have to say the issue is with the device/update.

0 Kudos
Jochen_M_
Beginner
1,865 Views

Now I made it work on Android, too (not on iOS, but it is not important for me). I checked the systems positioning settings two times, every important switch was on. Now I waited a long time inside the settings page, when a list of apps appeared (after 20 seconds or so). A question appeared like "Do you want to allow app xyz to determine your position". I´ve never seen this before, it must be new since Android 5.1.1. Apps I installed months and weeks ago already worked properly without this question.

Strange, it seems to be a new feature in 5.1.1. that automatically blocks new apps to use Geolocation without switching this option on inside the systems "Settings" area of my tablet.

I´m sorry for wasting your time. In the past, some things suddenly were out of order in XDK and suddenly they worked again. I was sure it must have been something here. Thank you very much for your support!

Yours,
Jochen M.​

0 Kudos
John_H_Intel2
Employee
1,865 Views

Thanks for sharing the detailed results, I am sure others will find it helpful if they search on this issue :)

0 Kudos
Jochen_M_
Beginner
1,865 Views

I am sure that many Android users will have this problem soon ;-)

0 Kudos
Ian_Devlin
Beginner
1,865 Views

For such things like geolocation, it is always a good thing that the user is asked (at least once) if they want the site/app to access their location, but of course apps usually include this in the "list of app permissions" list when the app is installed/updated, so it is weird to see that Android have changed the behaviour.

0 Kudos
Reply