pause and resume properly on android