Is there a way to determine if Android app is running full screen?

后端 未结 10 1912
春和景丽
春和景丽 2020-12-31 04:17

i was just wondering if there was a simple way to see if an application running on android is currently in full screen. is there a way to query android to see if you\'re cu

10条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-31 04:36

    Activity.hasWindowFocus() tells you if your own activity is visible to the user. But, as CommonsWare notes, it's much harder to tell if another activity is on the top of the stack. You can try querying the ActivityManager (e.g, ActivityManager.getProcessTasks() ), but its methods don't provide an exact answer for your question.

提交回复
热议问题