Anything like isWifiEnabled and setWifiEnabled for 3g an 2g/gprs?

by Rory McCann » Tue, 21 Apr 2009 01:36:26 GMT


Sponsored Links
 Hi all,

I see 
 http://developer.android.com/reference/android/net/wifi/WifiManager.html #isWifiEnabled()
that you can see if the wifi is enabled or disabled and also us
 http://developer.android.com/reference/android/net/wifi/WifiManager.html #setWifiEnabled(boolean)
to turn on and off the wifi.

I'm wondering if it's possible to do the same for 3G and for 2G/GPRS?
I know it's possible because you can turn off 3G and left 2G on.

The reason I want to do this is to write a simple application that
will let you easily turn on and off the wifi/3g/2g. I'm in Ireland and
don't have a unlimited data plan. I'd also like to turn off wifi/3g/2g
easily at certain time to prolong battery life.

--~--~---------~--~----~------------~-------~--~----~



Anything like isWifiEnabled and setWifiEnabled for 3g an 2g/gprs?

by Rory McCann » Tue, 21 Apr 2009 01:37:30 GMT


 Hi all,

I see 
 http://developer.android.com/reference/android/net/wifi/WifiManager.html #isWifiEnabled()
that you can see if the wifi is enabled or disabled and also us
 http://developer.android.com/reference/android/net/wifi/WifiManager.html #setWifiEnabled(boolean)
to turn on and off the wifi.

I'm wondering if it's possible to do the same for 3G and for 2G/GPRS?
I know it's possible because you can turn off 3G and left 2G on.

The reason I want to do this is to write a simple application that
will let you easily turn on and off the wifi/3g/2g. I'm in Ireland and
don't have a unlimited data plan. I'd also like to turn off wifi/3g/2g
easily at certain time to prolong battery life.


--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Cursor.moveToFirst() is taking up a lot of time

Hi,

Currently i'm working on a database system for some applications. I
need to do a lot of queries to load data from the database into the
application. After being amazed how much time it took to do these
queries on the database i found out that much time was consumed by
cursor.MoveToFirst(). This functions costs currently ~25% of all my
database action.

Does anyone know why this takes would take so long or does anyone know
a better solution to get to the first position of the cursor?


My code:

Cursor c = db.query(var1, var2, var3 .....);
c.CustomMoveToFirst();

int count = c.getCount();
for(int i = 0; i<count; i++){
        doSomethingWithCursor();
        c.moveToNext();
}


The same problem occurs when i place everything in a while loop and
use only the MoveToNext() function. So i think that the problem must
be in positioning the cursor to the first position.

My code:
Cursor c = db.query(var1, var2, var3 .....);
c.CustomMoveToFirst();

while(c.moveToNext()){
         doSomethingWithCursor();
}

Thanks,
Sublimity Mobile Software

--~--~---------~--~----~------------~-------~--~----~

2. Android 1.5 Spare parts Battery History does not display any data

Because the emulator doesn't have a battery?

j






-- 
Jeff Sharkey
jshar...@android.com

--~--~---------~--~----~------------~-------~--~----~

3. Screenshots on AndAppStore

4. Problem of using switch_class for headset detection

5. Magic review

6. Bluetooth microphone activation

7. java libraries