سؤال

I have wrote an application and dont want to do anything other than my application on installed device. But in Android 3.x versions, i couldn't disable the status bar programmaticaly. Then i have to check the application, when it is BACKed and returned to device desktop, and when it is returned and worked on my application. Is there a way to check that application is active on foreground or invisible but runnning on background?

Thanks everyone.

هل كانت مفيدة؟

المحلول

In your Activity, onResume will be called when it becomes visible and onPause will be called when it is no longer visible.

See here for more detailed info: http://developer.android.com/reference/android/app/Activity.html

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top