Hi,
Is there a way to measure how much time the user spent using the app?
i.e. the time the app was in the foreground, not suspended in background?
thanks.
Hi,
Is there a way to measure how much time the user spent using the app?
i.e. the time the app was in the foreground, not suspended in background?
thanks.
Yes, it’s possible. Corona triggers events when the app is started/stopped/suspended/resumed. See http://docs.coronalabs.com/api/event/system/type.html
The system.getTimer() API will get you the elapsed time since your app started. You can save values during pause and resume events to keep track of an elapsed time.
Rob
Yes, it’s possible. Corona triggers events when the app is started/stopped/suspended/resumed. See http://docs.coronalabs.com/api/event/system/type.html
The system.getTimer() API will get you the elapsed time since your app started. You can save values during pause and resume events to keep track of an elapsed time.
Rob