The constructor WifiInfo() is not visible

by Flappie » Mon, 03 Nov 2008 13:40:08 GMT

Sponsored Links
 Yes i know.....i'm a newbie.
But i'm currently learning the syntax of android using Eclipse.
I'm trying to get the network SSID and just through it to the
log.....for learning purpose i would say.
this is my part code:

WifiInfo checkx = new WifiInfo();
android.util.Log.v("sometag","SSID= " + checkx.getSSID());

I get a error on the "new WifiInfo()" part.
Saying: "The constructor WifiInfo() is not visible"
Why can't it find/see the contructor of this Class?

It's comming from:

I know...i'm a newbie but i've got to start somewhere.......


The constructor WifiInfo() is not visible

by Jason Parekh » Mon, 03 Nov 2008 14:06:01 GMT

 hey Flappie,

The WifiInfo constructor isn't public as it's not meant to be instantiated
by clients.  Instead, you retrieve it from WifiManager's getConnectionInfo.
You can get a reference to WifiManager by using
context.getSystemService(Context.WIFI_SERVICE) (and casting it).

For more info, check out: 



Sponsored Links

Other Threads

1. Lapor !! Newbie nih!

Nama saya Verdy dari Medan. Baru beli HTC Magic dgn ROM Hero (thanx to tauke 
tokonya : Halim)

Saat ini koneksinya pake XL (so far so good... dan itu pun setelah dpt 
pencerahan dr member milis ini.. spy ngirim MMS gampang.. ternyata malah dpt 
paket koneksi yg juga murah meriah)

Kesan pertama pake Android : tidak segampang yg saya bayangkan.. hehe.. mungkin 
faktor kebiasaan ya? Krn biasanya pake WinMo dan BB) 

Kalo ada kesusahan.. nanti saya posting2 lg di sini..

Mohon pencerahannya ya? 

Sent from my HTC dgn sinyal kuat XL
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to

To request to subscribe to this group:


2. KeyStore JKS implementation not found

I have discovered that JKS is not supported by android.

How do I create a BKS keystore?


3. Getting a File object from android

4. Need help with part of an app.. countdown

5. eclair patch for arm920 s3c244x family

6. LocationManager.requestLocationUpdates()

7. Unable to found the 'Android' in eclipse-> Window > preferences on windows 7 OS