Re: Location via WiFi on Mobile?
I'm still trying to fathom Location Services on mobile, if this helps anyone. Apparently under iOS 5.1.1 (using wifi), the locationChanged message is not sent at all when querying location loosely (nor is any location data provided by the sensor). But location data is detected when mobileStartTrackingSensor is started using detailed readings There's a quirk in this however, in that location tracking will work as expected for a bit after the sensor tracking is turned off and then restarted using loose readings. There seems to be some time threshold of the sensor being available which has been hard to pin down (maybe variable), and appears to be the cause of the inconsistent results I've been getting. Frustratingly, all works as expected under iOS 5.1 (loose or detailed). So from what I can tell, if you need your mobile app to get location data reliably across system versions, used detailed sensor tracking. Until somebody else figures this out better than I. Or until the asteroid due Feb 15 wipes out Earth's geolocation services. Regards, Scott Rossi Creative Director Tactile Media, UX Design On 2/5/13 10:35 PM, Scott Rossi sc...@tactilemedia.com wrote: Answering my own question... After messing around with this for several hours (and some gracious off-list suggestions from John Dixon), it seems that a delay is indeed necessary between first calling mobileStartTrackingSensor and actually trying to get the location. I wound up essentially doing this: mobileStartTrackingSensor location, false wait 1000 millisecs with messages -- IMPORTANT get mobileSensorReading(location, false) It seems that AT LEAST a 1 second delay is required. It may be that a longer delay may be necessary out in the field. Boring testing details follow -- feel free to ignore... I was testing on 3 devices: an iPad 2, and iPhone 4, and an iPod touch, all via wifi -- and discovered an odd behavior. The iPad and iPhone repeatedly failed at attempts to retrieve location, while the iPod worked consistently. All were running the same block of code from the same LC stack. For the life of me, I could not figure out what the difference was, until checking the iOS versions: the iPod was running an older system version (all are using a flavor of iOS 5). Perhaps Apple added additional goodness to more recent versions of iOS, so location services take longer to start. And I haven't even tested on iOS 6 yet. I don't know how one would ever be able to track this down, much less troubleshoot it, without having access to multiple devices. Anyway, the lesson learned here: when in doubt, delay. Regards, Scott Rossi Creative Director Tactile Media, UX Design On 2/4/13 10:40 PM, Scott Rossi sc...@tactilemedia.com wrote: 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 sc...@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 jac...@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 | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe,
Re: Location via WiFi on Mobile?
Why is locationChanged more robust than directly querying the sensor? Anyway, the issue still seems to be the same. The devices running iOS 5.1.1 display no data while the iOS 5.1 device does. Regards, Scott Rossi Creative Director Tactile Media, UX Design On 2/5/13 10:41 PM, Monte Goulding mo...@sweattechnologies.com wrote: Why not handle locationChanged? Much more robust than waiting 1 second. -- M E R Goulding Software development services mergExt - There's an external for that! On 06/02/2013, at 5:35 PM, Scott Rossi sc...@tactilemedia.com wrote: mobileStartTrackingSensor location, false wait 1000 millisecs with messages -- IMPORTANT get mobileSensorReading(location, false ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Location via WiFi on Mobile?
Robust because the location manager may not have a location still after 1 second. It probably will but it might not. -- M E R Goulding Software development services mergExt - There's an external for that! On 06/02/2013, at 7:00 PM, Scott Rossi sc...@tactilemedia.com wrote: Why is locationChanged more robust than directly querying the sensor? Anyway, the issue still seems to be the same. The devices running iOS 5.1.1 display no data while the iOS 5.1 device does. Regards, Scott Rossi Creative Director Tactile Media, UX Design On 2/5/13 10:41 PM, Monte Goulding mo...@sweattechnologies.com wrote: Why not handle locationChanged? Much more robust than waiting 1 second. -- M E R Goulding Software development services mergExt - There's an external for that! On 06/02/2013, at 5:35 PM, Scott Rossi sc...@tactilemedia.com wrote: mobileStartTrackingSensor location, false wait 1000 millisecs with messages -- IMPORTANT get mobileSensorReading(location, false ___ use-livecode mailing list use-livecode@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Location via WiFi on Mobile?
Good point. This reinforces what I've been experiencing: a delay is needed between starting up location services and actually using them. Plus implementing a timeout if there's no usable result after a set period of time. Regards, Scott Rossi Creative Director Tactile Media, UX Design On 2/6/13 1:52 AM, Monte Goulding mo...@sweattechnologies.com wrote: Robust because the location manager may not have a location still after 1 second. It probably will but it might not. -- M E R Goulding Software development services mergExt - There's an external for that! On 06/02/2013, at 7:00 PM, Scott Rossi sc...@tactilemedia.com wrote: Why is locationChanged more robust than directly querying the sensor? Anyway, the issue still seems to be the same. The devices running iOS 5.1.1 display no data while the iOS 5.1 device does. Regards, Scott Rossi Creative Director Tactile Media, UX Design On 2/5/13 10:41 PM, Monte Goulding mo...@sweattechnologies.com wrote: Why not handle locationChanged? Much more robust than waiting 1 second. -- M E R Goulding Software development services mergExt - There's an external for that! On 06/02/2013, at 5:35 PM, Scott Rossi sc...@tactilemedia.com wrote: mobileStartTrackingSensor location, false wait 1000 millisecs with messages -- IMPORTANT get mobileSensorReading(location, false ___ use-livecode mailing list use-livecode@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@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Location via WiFi on Mobile?
Answering my own question... After messing around with this for several hours (and some gracious off-list suggestions from John Dixon), it seems that a delay is indeed necessary between first calling mobileStartTrackingSensor and actually trying to get the location. I wound up essentially doing this: mobileStartTrackingSensor location, false wait 1000 millisecs with messages -- IMPORTANT get mobileSensorReading(location, false) It seems that AT LEAST a 1 second delay is required. It may be that a longer delay may be necessary out in the field. Boring testing details follow -- feel free to ignore... I was testing on 3 devices: an iPad 2, and iPhone 4, and an iPod touch, all via wifi -- and discovered an odd behavior. The iPad and iPhone repeatedly failed at attempts to retrieve location, while the iPod worked consistently. All were running the same block of code from the same LC stack. For the life of me, I could not figure out what the difference was, until checking the iOS versions: the iPod was running an older system version (all are using a flavor of iOS 5). Perhaps Apple added additional goodness to more recent versions of iOS, so location services take longer to start. And I haven't even tested on iOS 6 yet. I don't know how one would ever be able to track this down, much less troubleshoot it, without having access to multiple devices. Anyway, the lesson learned here: when in doubt, delay. Regards, Scott Rossi Creative Director Tactile Media, UX Design On 2/4/13 10:40 PM, Scott Rossi sc...@tactilemedia.com wrote: 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 sc...@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 jac...@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 | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@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@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Location via WiFi on Mobile?
Why not handle locationChanged? Much more robust than waiting 1 second. -- M E R Goulding Software development services mergExt - There's an external for that! On 06/02/2013, at 5:35 PM, Scott Rossi sc...@tactilemedia.com wrote: mobileStartTrackingSensor location, false wait 1000 millisecs with messages -- IMPORTANT get mobileSensorReading(location, false ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Location via WiFi on Mobile?
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? Most every app that does anything with location works fine using WiFi on these devices, so there's no issue with service. Any suggestions? Thanks Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Location via WiFi on Mobile?
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 | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Location via WiFi on Mobile?
[ 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 jac...@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 | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Location via WiFi on Mobile?
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 sc...@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 jac...@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 | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Location via WiFi on Mobile?
In my experience : instant accurate calculation under iOS and, yes, need of a few seconds to get the accurate calculation under Android. Le 5 févr. 2013 à 07:40, Scott Rossi a écrit : 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? -- Pierre Sahores mobile : 06 03 95 77 70 www.sahores-conseil.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode