check android app's status about being in background or foreground.