Why since LV 8.1 the GPS acquisition is more longer ?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Why since LV 8.1 the GPS acquisition is more longer ?

Sannyasin Brahmanathaswami via use-livecode
Hello,

Why since Livecode 8.1, GPS acquisition is more longer than Livecode < 8 on mobile ?

On the same place, my mobile  get coordinates within few seconds with the app compiled with LV < 8.1 but get coordinates after more than 15 seconds (more than one cycle on my script) if the app is compiled with LV > 8.1

Any ideas ?

Thanks

Here my script :

################################

on opencard :
if the environment is "mobile" and mobileCanTrackLocation() is "true » then

        if "iphone" is in the platform then

                get mobileLocationAuthorizationStatus()

                if "denied" is in it or "restricted" is in it then ...

        end if

        mobileStartTrackingSensor "location"

        wait 10 milliseconds with messages

        put getcoord() into old « coordinates »

         mobileStopTrackingSensor « location »

end if
       
end opencard

################################

on locationChanged pLatitude, pLongitude, pAltitude

        set the coordonnees of this stack to pLatitude & tab & pLongitude & tab & pAltitude

end locationChanged


################################

function getCoord
        get the coordonnees of this stack

        put mobileCurrentLocation() into tLocation    

        if tLocation is an array and tLocation["latitude"] <> "" and tLocation["longitude"] <> "" then

                return tlocation

        else

                if the coordonnees of this stack <> it then

                        return the coordonnees of this stack

                else
                        put the seconds into timeout
                        repeat forever
                                if the seconds - timeout > 15 then
                                answer « Is too long, Retry ? » with « Yes » or « No"
                                if it is « No » then
                                         mobileStopTrackingSensor « location"
                                        exit repeat
                                else
                                         mobileStopTrackingSensor « location »
                                        wait 200 milliseconds with messages
                                        mobileStartTrackingSensor "location"
                                        put the seconds into timeout ### new cycle
                                end if
                                put mobileCurrentLocation() into tLocation    
                                if tLocation is an array and tLocation["latitude"] <> "" and tLocation["longitude"] <> "" then  
                                        exit repeat
                                else
                                        put mobileSensorReading("location",true) into tlocation
                                        if tLocation is an array and tLocation["latitude"] <> "" and tLocation["longitude"] <> " » then exit repeat

                                end if
                        end repeat
                        if tLocation is an array and tLocation["latitude"] <> "" and tLocation["longitude"] <> " » then
                                return location
                        else return the coordonnees of this stack ### old coordinates
                end if
        end if
end getCoord
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...