i have made an android application in which i need user's gps and internet connection. Now if the user has not switched any of the above on, then i show a message to th开发者_如何学运维e user to switch on their gps and internet.
Once the user reads this message and switches his gps and internet on, i need to reload my activity. To do this i need to capture the event when the user has switched on his gps/wifi and then reload my activity.
How do i achieve this?
Thank you in advance.
BroadCastReceiver & NetworkManager will solve your problem. This will help you.. Detect 3G or Wifi Network restoration
精彩评论