Programatically selection of 3G network connection in G1?

by Joseph Teo » Tue, 12 May 2009 09:02:34 GMT

Sponsored Links
 Hi Folks,

I'm working on some data transmission program and current it works alright
on WIFI connection.

However, I understand that if I am in an environment where there are both 3G
and WIFI coverage... the phone will (by default) be turned onto the WIFI
network connection.

However, if for some reasons, I wish to be connected directly to 3G (e.g. 3G
is more stable in public WIFI area).... is it possible to do so
programatically on the Android phone? If i'm not wrong, it's possible using
the ConnectionManager API, am I right?

May i ask if anyone has done something like that and  don't mind sharing the
code snippets to do so , or point me to the right direction for this?

Many Thanks in Advance!



Other Threads

1. How to detect a "full boot" of an emulator


I understand from the documentation that an adb wait-for-device only
blocks until the device is online, and it does not wait for a full
boot of the application per the docs here:

I see that when I launch an emulator from Eclipse, there is a line in
the console output that reads:

Waiting for HOME ('android.process.acore') to be launched...

Which seems to wait for that process to start before uploading
the .apk file and running the Activity.  I'd like to be able to do
this programmatically in Ant as we are trying to automate some
instrumentation tests.  I can do an adb shell ps continually to check
for the existence of the android.process.acore process to show up,
however this adds a lot of complexity in the Ant build (can't run exec
under a waitfor, and running exec multiple times is problematic due to
write-once properties).

Does anyone have any suggestions for a better way to detect this state
in an Ant script?  Not sure how ADT in Eclipse does it but it seems to
be relatively straightforward.



2. Inside TabActivity, how to get the instance of the current tab activity?


I have attached a menu to my TabActivity, and when a menu item is
selected, I would like to do something different based on which view
is being currently displayed in the TabHost.

int getCurrentTab() returns me the id of the current tab... but from
that int how can I get the instance of the activity running?

I also tried getCurrentView(), getCurrentTabView(), but these return
things I can't seem to cast to the class of the current activity.

Help is appreciated!


3. Wimax related problem

4. Games

5. baterai cadangan ato charger portabl

6. Switch Screens

7. Android 2.1 on Canadian Telus Milestone bug wont dial 1-888 numbers