Location via WiFi on Mobile?

J. Landman Gay jacque at hyperactivesw.com
Tue Feb 5 00:52:27 EST 2013


On 2/4/13 11:43 PM, Scott Rossi wrote:
> Anyone know if the mobileSensorReading function works for "location" on iOS
> devices through WiFi?  I can't seem to get any data from the function when
> testing a simple stack on an iPad2 and iPod.
>
> Using this script:
>
>       get mobileSensorAvailable("location")
>
>        if it is false then
>
>           answer "Unable to use location."
>
>           exit mouseUp
>
>        end if
>
>        --
>
>        mobileStartTrackingSensor "location", true
>
>        put mobileSensorReading("location", true) into geoData
>
>        mobileStopTrackingSensor "location"
>
>        answer geoData
>
>
> Playing around with variations of this script, I either get "true" or empty
> in the geoData variable.  Am I missing something?

It looks like the detailed location (what you get when you specify 
"true" in the second param) will be an array, so after getting the 
geoData you'd need to parse out something like geoData["latitude"] or 
geoData["timestamp"].

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list