Activity Life Cycle + system.currentTimeMillis ()

0

This activity is about life cycle on Android, I read several materials but still lost? Can someone please explain it?

    
asked by anonymous 19.05.2017 / 01:47

1 answer

0

Take a look here: link

Explain in more detail what I mentioned in my last comment. But basically the logic is you use System.currentTimeMillis () to save time frames that you will want to measure: when the Activity starts, when it pauses, etc.

To measure the time passed between these frames, just take the difference between them, which will be a value in milliseconds, then just convert to the unit you want (minutes, seconds, etc.).

    
19.05.2017 / 16:24