You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Sergey Shakhnazarov (Akvelon)" <v-...@microsoft.com> on 2015/09/07 18:36:34 UTC
Geolocation plugin for Android & Location services off
Hi guys,
I wanted to discuss an issue with Geolocation plugin for Android - fail callback is not called if Location services are turned off.
Is this a known issue?
I have noticed that it was previously handled by native code [1], which has been removed in favor of HTML5 in [2].
Is there a way to check Location services state in WebView?
If not - is it worth to get that native code back to fail fast if no location providers are enabled (BTW, opts.timeout does not seem to work as well)?
[1]: https://github.com/apache/cordova-plugin-geolocation/blob/99945c542cf65e50b7704ccc6c739246135eef5d/src/android/GeoBroker.java#L91-L94
[2]: https://github.com/apache/cordova-plugin-geolocation/commit/ab8a448e52b0c2cc05fabe3e0d0cff3fd859b020
Please let me know if you have any questions or considerations.
Best regards,
Sergey Shakhnazarov
Re: Geolocation plugin for Android & Location services off
Posted by Joe Bowser <bo...@gmail.com>.
1. There isn't a way to check the Location Services state in WebView
2. No, it is still not worth getting the native code back for this. It's
already bad enough that I might have to resurrect this plugin for
permissions, but bringing this plugin back would be a huge step backwards
for the project.
On Mon, Sep 7, 2015 at 9:36 AM Sergey Shakhnazarov (Akvelon) <
v-seshak@microsoft.com> wrote:
> Hi guys,
>
> I wanted to discuss an issue with Geolocation plugin for Android - fail
> callback is not called if Location services are turned off.
> Is this a known issue?
>
> I have noticed that it was previously handled by native code [1], which
> has been removed in favor of HTML5 in [2].
> Is there a way to check Location services state in WebView?
> If not - is it worth to get that native code back to fail fast if no
> location providers are enabled (BTW, opts.timeout does not seem to work as
> well)?
>
> [1]:
> https://github.com/apache/cordova-plugin-geolocation/blob/99945c542cf65e50b7704ccc6c739246135eef5d/src/android/GeoBroker.java#L91-L94
> [2]:
> https://github.com/apache/cordova-plugin-geolocation/commit/ab8a448e52b0c2cc05fabe3e0d0cff3fd859b020
>
> Please let me know if you have any questions or considerations.
>
> Best regards,
> Sergey Shakhnazarov
>
>
>