Handled pause and resume on Android