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:
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:
@ 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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment