-
Notifications
You must be signed in to change notification settings - Fork 1.1k
native geolocation deprecated on Android #430
Comments
@mica16 what errors you are getting with ngCordova? Because ngCordova already use the Web API ref I'll make some tests with geolocation. |
@felquis I tested on Samsung S5, geolocation works.
No Javascript alert is displayed at all, meaning that ngCordova doesn't return a promise in this case... Actually, when I don't set the "Position" option (to get the local position of the phone user) on the Samsung parameter section, I don't get any data..and no errors is displayed... |
@mica16 Any updates on this? Unfortunately I can't test on Samsung Galaxy S4 but I tested it on Samsung Galaxy S3, Samsung Galaxy S5 and Galaxy Tab 4 and it works for all. The problem I have with Android 4.4 in general is that WiFi is not able to find the location. On my Samsung Galaxy S3 the WiFi geolocation works fine. |
Hi, Actually, I noticed that when the property Personally, in the context of my app, I set |
You got the WiFi geolocation working with |
I found a tricky bug:
and in the Android phone settings about "Position", the radio button set on "GPS only", Question so: why is timeout reached even when 'enableHighAccuracy: true' when using GPS ONLY ? Here's a related stackoverflow question I found on the subject but no answer..: And here's mine I asked: |
I'm having this exact same issue, any updates to this? |
I also, didn't find solution for that issue. |
+1 seeing the same issues on Galaxy S3 mini running Android 4.4.4 |
@Kukiwon Did you try to install Crosswalk? Because this is remedy. Also you can create function with setinterval, at first run it will fail but next one will execute properly. |
@mikeon yes i'm using crosswalk. I'll try using an interval for getting a location and will keep you posted. |
@mikeon your proposed solution using an interval did not work for me. Eventually we reinstalled Android on the phone and now it works. Looks like it was an issue with the device. Thanks again! |
same issue as mica16... Is there a way out, or is there some other plugin that I can use? |
I've tried cordova-plugin-geolocation with ngCordova but it always returned me Timeout error, meaning it can't get device's position in my even 5 minutes set timeout, so the final solution for Android 5.1 at least:
it wasn't working without |
I struggle to make the geolocation works on Android, using ngCordova and of course the org.apache.cordova.geolocation plugin.
I came across this Jira:
https://issues.apache.org/jira/browse/CB-5977
Is ngCordova aware of this deprecation?
What is the best way today to use geolocation on Android with ngCordova?
Indeed, it seems that, when the plugin is installed, Android always try to use the native way, that..isn't available any more.
Should I write an ugly pseudo-code like:
if(window.cordova && isAndroid()) { useTheBrowserImplementation()} elseif(window.cordova && isIos()) {useNgCordova())}
?Thanks a lot,
Michael
The text was updated successfully, but these errors were encountered: