Sunday, February 16, 2014

How to capture the notification bar for other applications click event


Recently made a map application, when the phone pull down the notification bar, click the GPS switch time, how do I capture this event?

I found the notification pull-down or pull-up bar, or click on the notification bar of some system settings button, they can not trigger onresume methods currently applied, do not know how to listen for the click event system. But I found that Baidu Maps can do this, but check online for a long time, did not find a solution, with which the experts can give pointers pointing<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
There is a mechanism to get WIFI or 3G network, and do not have access to the GPS
Reply:
cited a floor pengguohua1988 reply:
mechanism is WIFI or 3G network access, and you do not have access to the GPS


There are some, but now I need to pull in the notification bar when the event triggering the call to go to determine whether the open method of GPS
Reply:

reference to the second floor kouwoo reply:
Quote: references to a floor pengguohua1988 reply:

There is a mechanism to get WIFI or 3G network, there is no access to the GPS you


There are some, but now I need to pull in the notification bar when calling a method to determine whether to open the GPS
In the event trigger to go



@ Override
public void onWindowFocusChanged (boolean hasFocus) {
/ / TODO Auto-generated method stub
super.onWindowFocusChanged (hasFocus);

/ / Behalf hasFocus is false when the drop-down notification bar to state, on the contrary, compared with the initial state of the hidden
in titleBar
}
With this you hasFocus is true when the judge can

No comments:

Post a Comment