-1

I'm working with Receiver and I can detect Wifi state changes in Wifi Setting System.

But I need to know specified application is showing or not to do more thing,

ex. if specified application was hide in Background, do nothing, and if it was showing for user to integrate, I will do something.

People who know how to check specified application was running is showing or not,

Please help me,

p/s :

  • I have 1 Receiver and 1 Activity (is "specified Application" as I mentioned)

  • I can integrate in onReceive method, it means I know how to receive signal.

Thanks.

SOLUTION

Okay, thank you,

I know how to check.

I need stored public static boolean in onPause method, to indicate current is invisible state.

And when onResume method was called, the above boolean will be in Visible state.

How to check if activity is in foreground or in visible background?

4

1 回答 1

0

好的谢谢你,

我知道如何检查。

我需要存储public static booleanonPause()方法中,以指示其当前处于invisible状态。

onResume方法被调用时,上面的布尔值将处于Visible状态。

如何检查活动是在前台还是在可见背景中?

于 2014-12-27T05:13:19.083 回答