• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Any Data Enable/Disable Widget for Froyo?

lou2s

Lurker
Jun 4, 2010
6
0
Hi all,

As Nexus One is the only model which has already "partly" updated to Froyo, I think I'd better post it here.

Before Froyo, if I wanna enable/disable mobile data usage, I used a passive way, changing the APN server setting, to fool the system so it couldn't connect.

In Froyo, there is a new option under Setings -> Wireless & Network Settings -> Mobile Networks called Data enabled/disabled, which is a much direct approach than changing the APN.

But up to today, I've yet to see a widget which targets at this option. Currently I hv made a 3G shortcut to that setting page on to my home screen. Really hope there will be a toggle widget instead!

So how do u guys enable/disable data usage at the moment without a handy widget on Froyo?

Thanks!
 
Thx. Just tested it. It worked as expected but in the old APN way (changing the APN server name), like other widgets such as switchpro/apnoid. I m looking forward to a widget which can make use of the new froyo setting.

(yeah I know 2 approaches produce a similar effect. I just wonder if I keep the Mobile Data setting on and let it to connect to a wrong address will cause any battery waste. Hope u understand my point of view, and this is related only to android 2.2, not to previous versions)
 
Upvote 0
Seeing as most of the data toggle widgets edit the servername of the APN, I don't use any of them. Because most of the times turning data back on doesn't work unless I reboot.

So I just keep a shortcut to my APNs and switch between my default APN and another empty one I created... For now.

High hopes for froyo-compatible toggle widgets tho!
 
Upvote 0
Changing programmatically the new "Data enabled" setting is not possible AFAIK on Android 2.2 (froyo). This setting is a "Secure" setting that can only be read, unless the app is granted the android.permission.WRITE_SECURE_SETTINGS permission. Unfortunately this permission is not granted by the PackageManager to ordinary applications, even if you declare it in the app manifest.

So I'm afraid that apps/widgets modifying the APNs are still the best solution for now to enable/disable your mobile network connection.

Richard
 
  • Like
Reactions: lou2s
Upvote 0
Changing programmatically the new "Data enabled" setting is not possible AFAIK on Android 2.2 (froyo). This setting is a "Secure" setting that can only be read, unless the app is granted the android.permission.WRITE_SECURE_SETTINGS permission. Unfortunately this permission is not granted by the PackageManager to ordinary applications, even if you declare it in the app manifest.

So I'm afraid that apps/widgets modifying the APNs are still the best solution for now to enable/disable your mobile network connection.

Richard
a shortcut to the "Data enabled" setting on your desktop?
 
Upvote 0
Can you only do this using BetterCut into the Mobile Network Settings menu?

Or is there another way?

I'd like to put this icon on one of the LauncherPro dock buttons but can't work out how to do it. Any ideas?

Yup I use BetterCut. I use ADW all the time so it's just a drag to put the "3G" icon onto its hidden app dock (and I quite like this, swiping up the home button for my hidden setting:D). I hv tried to put that icon onto dock of LauncherPRO 0.6.5.1 but in vain.:(

Another method will be using QuickSettings (Free at market). I set long pressing search button to launch QuickSettings (so I can call it out anywhere), then I can tap on the APN row (not the on/off toggle, and u hv to keep it always on in QuickSettings) to go to the froyo data enable menu.
 
Upvote 0
Another method will be using QuickSettings (Free at market). I set long pressing search button to launch QuickSettings (so I can call it out anywhere), then I can tap on the APN row (not the on/off toggle, and u hv to keep it always on in QuickSettings) to go to the froyo data enable menu.
That's how I did it pre-froyo and still do now. But there really should be a way to enable-disable with one click (without the chance of screwing up your data connection).
 
Upvote 0
It has to be possible, quick settings does it. I'm looking through it right now, I'll post if I find a solution.

Unless the developer.android docs are missing it, I'm guessing quick settings uses something a little more 'hacky' than a normal api call. From what I've seen so far, it uses android.permission.MODIFY_PHONE_STATE, so I'm looking around in telephony. It also mentions in the wiki that the api calls it uses are undocumented (how the hell did they find them then??) but whatever.

Hoping we can find this soon, I'm working on an auto toggle that could save us all a lot of battery.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones