Hi,

I was looking for the way to disable/enable 3G too.

This is what I came up with:
1) There is no API for this.
2) There are enough examples of how to achieve that using some techniques
(for example (http://stackoverflow.com/questions/3644144/how-to-disable-mobile-data-on-android). 3) No matter which technique you are using you need to grant the MODIFY_PHONE_STATE permission. 4) This permission was marked as "for system use only" in Android version 2.3. 5) According to Google this is the expected behavior and they are not going to change it.
    (check out http://code.google.com/p/android/issues/detail?id=15022).

I gave up this feature, please let me know if you find a 'proper' way to accomplish disabling/enabling 3G mobile data.

Thanks
/Yaron

--
Yaron Reinharts
Smart Drive Applications
http://www.poncho.co.il/gateaway.php
https://market.android.com/details?id=com.poncho.gsm.gate.activities



On 03/22/2012 05:04 AM, Hamza wrote:
Hi!

I am trying to develop an application that smartly manages wifi vs 3g for a user. I am looking for a way to totally disable 3G on a device (similar to how a user can do it in the settings, but programmatically instead). Specifically, I need a way to do this on Android 4.0. How can an app disable mobile data on a device??

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to