What should be the method for calculating the time for which wifi remains on and the timer stops as soon as wifi gets switched off and the methods returns the time in seconds .
Asked
Active
Viewed 50 times
0
-
1listent to broadcasted events. see: http://stackoverflow.com/a/12894153/26224 – muratgu Jun 29 '16 at 19:19
1 Answers
1
You can create broadcastReceiver for connectivity change and then in that broadcast receiver u can check the wifi connectivity and start or stop timer accordingly

Rajat Gupta
- 127
- 7