Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please give me some keyworkds to toggle between 2g and 3g in Android by code.

If you have code snippets. Please give me.


Thanks for all
Nguyen Dai Son
[removed email]
Posted
Updated 3-Nov-10 23:42pm
v2
Comments
LittleYellowBird 4-Nov-10 5:43am    
Hi, It is best not to include your email address as it encourages spam, you will get an email automatically when somebody responds. :)
lienfam 4-Nov-10 21:46pm    
Hi Alison P. Thanks for your helpful advise!.

1 solution

There is no option to change between 2G and 3G in code, the phone hardware makes the decision based on network availability.
If you think about it, if you had this option to force a phone from 3G to 2G that would also force voice traffic onto the 2G network.

Outside of code the only option is to get a SIM card that is not enabled for 3G access that will restrict the phone to whatever network it is enabled for.
 
Share this answer
 
Comments
Anthony Mushrow 5-Nov-10 11:27am    
Actually on my device you have the choice of 2G only, 3G only, or just let the phone use whichever network has the strongest signal. So presumably there must be something somewhere, although it may be device specific.
Rod Kemp 5-Nov-10 11:35am    
You will probably find it is device specific, or is an OS setting, and has a hook into the hardware which would disable one or more parts of the radio hardware that is not available to programmers as it is a phone wide setting.
lienfam 20-Nov-10 10:14am    
Hi Rod Kemp.
Thanks for your helpful answer.
Best regards,
DaiSon

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900