Added sdcard access permission and save onPause().