Does MobileSensorReading work?

John Dixon DixonJA at hotmail.co.uk
Fri May 26 11:10:11 EDT 2017


You must start the 'sensor' first... usually done in your openStack handler... as in :-


on openStack

if environment() = "mobile" then


  mobileStartTrackingSensor "location", false

end if

end openStack


on locationChanged latitude, longitude

   set the theCurrentLocation of this stack to latitude & comma & longitude

end locationChanged


then as your location changes, the locationChanged message will give you the new lat/long 😊


Dixie

________________________________
From: use-livecode <use-livecode-bounces at lists.runrev.com> on behalf of Jonathan Lynch via use-livecode <use-livecode at lists.runrev.com>
Sent: 26 May 2017 15:56
To: How to use LiveCode
Cc: Jonathan Lynch
Subject: Does MobileSensorReading work?

I put a button on my app and put the app on my iPhone.

The button had the following script:


on mouseUp

put MobileSensorReading("location",true) into tReading

answer the Keys of tReading

answer tReading

end mouseUp

I figured this would tell me if the function was supposed to return an
array or a variable, since I had read both online.

Interestingly, it returned empty for both.



--
Do all things with love
_______________________________________________
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
Runtime Revolution - use-livecode Mailing List<http://lists.runrev.com/mailman/listinfo/use-livecode>
lists.runrev.com
This mailing list is intended for discussion relating to using LiveCode. To see the collection of prior postings to the list, visit the use-livecode Archives




More information about the Use-livecode mailing list