[ 
https://issues.apache.org/jira/browse/CB-13286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joe Bowser resolved CB-13286.
-----------------------------
    Resolution: Won't Fix

The browser handles all Geolocation functionality, which means that this is a 
bug we can literally do nothing about, since we just handle permission handling 
on Android 5.x and higher.  You could see if using a Third Party WebView is an 
option for Huawei devices, however there's none that I would currently 
recommend.



> plugin-geolocation fails , after 2 min, in Huawei P9/10
> -------------------------------------------------------
>
>                 Key: CB-13286
>                 URL: https://issues.apache.org/jira/browse/CB-13286
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-geolocation
>    Affects Versions: [email protected]
>         Environment: cordova -v  7.0.1
> Installed platforms:
>   android 6.1.0
> com.phonegap.plugins.nativesettingsopener 1.2 "Native settings"
> cordova-plugin-background-mode 0.6.6-dev "BackgroundMode"
> cordova-plugin-bluetooth-serial 0.4.6 "Bluetooth Serial"
> cordova-plugin-compat 1.1.0 "Compat"
> cordova-plugin-console 1.0.5 "Console"
> cordova-plugin-datepicker 0.9.3 "DatePicker"
> cordova-plugin-device 1.1.4 "Device"
> cordova-plugin-dialogs 1.3.0 "Notification"
> cordova-plugin-file 4.3.1 "File"
> cordova-plugin-geolocation 2.4.1 "Geolocation"
> cordova-plugin-googlemaps 1.4.0 "phonegap-googlemaps-plugin"
> cordova-plugin-mauron85-background-geolocation 2.2.4 
> "CDVBackgroundGeolocation"
> cordova-plugin-media 2.4.1 "Media"
> cordova-plugin-network-information 1.3.0 "Network Information"
> cordova-plugin-splashscreen 4.0.1 "Splashscreen"
> cordova-plugin-vibration 2.1.2 "Vibration"
> cordova-plugin-whitelist 1.3.0 "Whitelist"
> cordova-plugin-x-toast 2.5.2 "Toast"
> cordova.plugins.diagnostic 3.2.1 "Diagnostic"
> de.appplant.cordova.plugin.local-notification 0.8.2dev "LocalNotification"
> phonegap-plugin-push 1.10.5 "PushPlugin"
>            Reporter: Ivan Penchev
>
> Logic of the program:
> <get POI from servers> if CurrentLocation is close to POI <sound Notification>
> Important to notice is this bug happens on only Some phones (Mostly  Huawei 
> P9/10), as same code runs perfectly on my S6.
> Logic implemntation:
> {code:JavaScript}
> function onAppReady()
> {
> build_dom();
> gps_watch();
> if IOS .....
> If Android ....
> }
> function gps_watch()
> {
>       var options = {
>               enableHighAccuracy: true,
>               timeout: 30000
>       }
> gps_watch_handle = navigator.geolocation.watchPosition(
>               location_received,
>               function(obj)
>               {
>                    some code here... basically it says  to restart the 
> gps_watch()
>                 },
> ,
>               options
>       );
> }
> function location_received(position)
> {
> if IOS .... do this
> If Android do this...
> basic logic is we create an data source with which we can compare.
>       pos = new Array(position.coords.latitude, position.coords.longitude, 
> position.coords.accuracy, position.coords.speed, position.coords.heading);
> }
> {code}
> So far  I tried to debug something in the console: 
> this is what I have:
> within gps_watch method
> within location_received method
>  >>> Latitude: 57.023577388
> within location_received method
>  >>> Latitude: 57.023596579
> this above repeate for about 2 minutes (which is how it should behave).
> Then it stops:
> within location_received method
>  >>> Latitude: 57.023733988
> within location_received method
> No errors no nothing. I tried manually to start the gps_watch method (just 
> added a button with that method attached as onClick) this happens:
> within gps_watch method
> within error function in gps_watch method
> within gps_watch method
> within error function in gps_watch method
> and this repeate.
> EDIT: in the error function object, which I receive after I manually click on 
> the gps_watch method with the button I greated lies this:
> body:::gps error: Timeout expired
> code:::gps errorcode: 3
> As you can see I am a novice developer, I would appreciate any guides into 
> how to solve/further debug this issue.
> Thank you,
> Ivan



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to