Ritwik Vashistha
Ritwik Vashistha

Reputation: 33

How to start timer when wifi is switched on ?

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

Answers (1)

Rajat Gupta
Rajat Gupta

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

Related Questions