GPS Listener in a thread?

Hello there,

I have built an app which calls a GPS function

[lua]Runtime:addEventListener( “location”, locationHandler )[/lua]

in response to a button click. This works great, and I can populate labels on the screen with the data received.
What I would like to do is have my listener run in a thread (or similar) so that other screen views in my application could also display the GPS data.

Is there a way of doing this?

Many thanks

Robin [import]uid: 74250 topic_id: 12409 reply_id: 312409[/import]

Runtime events keep running until you remove them so you could keep all the data received by the GPS event on global variables you can access from any screen. I hope that helps.

Andre [import]uid: 10048 topic_id: 12409 reply_id: 45572[/import]

Hi Andre,

Thanks for your reply.

I shall have a look at global variables, but I can see where you are coming from.

I am trying to write my first app with Corona, so I expect to b e asking loads of noob & silly questions!!

Thankyou

Robin [import]uid: 74250 topic_id: 12409 reply_id: 45576[/import]