1

I've looked everywhere a answer for this question but I've not found it. The question is: where I have to insert this code? On OnCreate?:

How do I see if Wi-Fi is connected on Android?

P.s. I've opened this new question because I've not reputation for comment.

Community
  • 1
  • 1
  • OnCreate is probably easiest. Have a class level Boolean variable and set it to the result of .isConnected(). You can then refer to that flag wherever in your code you need to. Please post some code and explain what you are trying to achieve with this if you need a better answer. – NigelK Jan 10 '14 at 10:14
  • please have a look i have posted the full example to you. – Jitesh Upadhyay Jan 10 '14 at 10:18
  • Thank you @NigelK!! :) For @JiteshUpadhyay, I asked for that specific code, not for other codes. I solved just by putting the code in OnCreate. Thanks anyway :) – CeesitarJet Jan 10 '14 at 12:30

0 Answers0