質問

I am developing an android application in which i want to turn off/on 3G. I have some doubts.

  1. Is it possible to programmatically access 3G data connection?

  2. If it is possible, how to turn off/on 3G data connection without accessing other data connections like 2G etc...?

  3. Is 3G and wifi works at same time?

  4. Which are the different data connections available in android?

Thanks in Advance

役に立ちましたか?

解決

There is an unofficial way to turn on/off 3g via reflection. It is not guaranteed to work on all phones so be aware of this. See this answer:

https://stackoverflow.com/a/12535246/1369222

This will not control 3g and 2g separately. This will turn on/off the entire data connection.

Wifi and 3g are not simultaneously connect at the same time. Usually, Wifi is given preference over 3g and the data switches to 3g is wifi connection is lost/unavailable.

The number and types of connections available differs from phone to phone. But most of them do support 2g/3g/wifi.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top