Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

test: Reply
LinkBack Thread Tools
Old July 14th, 2013, 09:29 PM   #1 (permalink)
New Member
Thread Author (OP)
Join Date: Jul 2013
Posts: 5
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default Wifi Application

Hi frnds i am new to android application development. I have a doubt abt the wifi based android application.

Do we need to explicitly use Wifimanager in our source code for developing apps which will receive wifi data or the OS will Take care of wifi things.

plz clarifi

chandradeor is offline  
Reply With Quote
sponsored links
Old July 20th, 2013, 06:01 PM   #2 (permalink)
Junior Member
Join Date: Jul 2013
Location: Michigan
Posts: 30
Device(s): N1, N Galaxy, N4, Samsung S4
Carrier: T-Mobile

Thanks: 0
Thanked 8 Times in 7 Posts

Use a broadcast receiver to listen to if NETWORK_STATE_CHANGED_ACTION event.

Then in your receiver:

public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub

ConnectivityManager conMngr = (ConnectivityManager)context.getSystemService(cont ext.CONNECTIVITY_SERVICE);
android.net.NetworkInfo wifi = conMngr.getNetworkInfo(ConnectivityManager.TYPE_WI FI);
android.net.NetworkInfo mobile = conMngr.getNetworkInfo(ConnectivityManager.TYPE_MO BILE);

if (wifi.isConnected()){

Log.d(LOG_TAG, "connected to wifi");

//receive data


Armuro is offline  
Reply With Quote
wifi applications

Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -5. The time now is 05:51 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.