Reputation: 33
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 .
Upvotes: 0
Views: 57
Reputation: 127
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
Upvotes: 1