I can move it to onPause(), but then user will not be notified when application is in the background. Will it be correct ?