Location via WiFi on Mobile?
Scott Rossi
scott at tactilemedia.com
Tue Feb 5 01:40:02 EST 2013
Hmm, maybe spoke too soon. Still getting odd, inconsistent results.
I thought maybe if mobileStartTrackingSensor was started using 'true'
(non-accurate sources) that mobileSensorReading should be used with
'false' (not detailed). But trying each combination of booleans I still
don't get a reliable result.
This is weird. On a few occasions, the expected values were answered, but
most of the time, I either get empty or the boolean used with
mobileSensorReading in the answer dialog.
Does it take time to start up location services? Is it possible that the
device needs a few seconds of "warm up" time before it can return a
meaningful result?
Regards,
Scott Rossi
Creative Director
Tactile Media, UX Design
On 2/4/13 9:56 PM, "Scott Rossi" <scott at tactilemedia.com> wrote:
>[ forehead slap ]
>
>Doh. Thanks Jacque -- guess I wasn't reading the docs closely enough.
>
>Regards,
>
>Scott Rossi
>Creative Director
>Tactile Media, UX Design
>
>
>
>
>On 2/4/13 9:52 PM, "J. Landman Gay" <jacque at hyperactivesw.com> wrote:
>
>>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
>>
>>_______________________________________________
>>use-livecode mailing list
>>use-livecode at lists.runrev.com
>>Please visit this url to subscribe, unsubscribe and manage your
>>subscription preferences:
>>http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
>
>_______________________________________________
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list