How to detect time out and user press the Home key?

How to detect time out and user press the Home key?

BY 17 Feb 2017 Web Application Development

I received feedback from Samsung that my game needs to stop sound automatically when:

– system time out and went to watch face

– when user press the Home key

How do I detect those events? And how do I resume? Thanks!

Written by