Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
piafinho
Old
(Last edited by piafinho; 11th August 2010 at 10:28 AM.) Reason: update
#1  
Member - OP
Thanks Meter 4
Posts: 54
Join Date: Aug 2009
Angry New Power Control widget with one click 2G/3G toggling

Hello

I waited a lot of time for Google to release the support of a API to allow changing the 2G/3G with one click
As many others I would like to have the ability to do it without need to go to the settings.

Since Google didn't do it, I decided to do it by myself.
For that I modified the Phone and Setting applications that are delivered in the Cyanogen 6 version.

I made a new Power Control widget that now has the following:

Additional buttons:
- 2G/3G toggling (one click. With 3G only or 3G preferred)
- Ring mode toggling (Different possibilities)
- Screen timeout (15s/1min/5 min or 30s/2m/5Min)
- Toggle orientation sensor(enabled/disabled)
- Brightness levels (added different possible levels)
- Airplane mode enable/disable
- Lock Screen enable/disable
- Flashlight (screen mode works on Magic. on N1 it doesn't work=Don't use it)

Options:
- Can now be set with vertical layout
- you can choose different buttons on the widget
- possibility for a transparent widget
- possibility to avoid the widget "round corners"
- Option to change to 2G automatically when Mobile data is disabled
- Option to change to 3G automatically when Mobile data is enabled back
- Option to disable sync automatically when WIFI is disabled (avoids sync on mobile data)
- Option to enable sync automatically when WIFI is enabled back
- Option to choose if Ring mode is ON with vibrate or with sound
- Option to monitor the Data roaming (set the icon to red if enabled)

Other changes:
Changes done to GPS or Mobile Data in normal Settings page are now automatically synchronized in the widget.

Limitations:
- Setting page still very ugly
- Like the original one, limited to a single 4x1 widget.
- Button order is fixed


Before I contribute with my code to Cyanogen, I would like to see the feedback of other persons to confirm if this change is interesting or not.
If not, I would keep it just to myself.

It was only tested in my own HTC Magic. So I cannot guarantee that it will work 100%. If you want it, then use it at your own risk
Unfortunately it require changes of main Phone applications so I don't think it is possible to do it for all the Phones.
For now it will only work with CM6

I hope this is also interesting for several other people.

How to download:
update.zip file:
http://share1t.com/lg7prf
 
piafinho
Old
(Last edited by piafinho; 10th August 2010 at 10:17 PM.)
#2  
Member - OP
Thanks Meter 4
Posts: 54
Join Date: Aug 2009
Screenshots:



My personal update procedure (flashmode):
Step 1:
Copy the update.zip (power_control_v2.01.zip) to the SD Card

Shutdown phone and boot it in recovery mode (On HTC Magic, press HOME + POWER to boot)

Step 2: (optional but recommended)
move the directory of your computer to were to store the backup files

Wait for the Recovery console
Connect the usb cable
adb.exe shell mount /system

Make a backup of the original files:
adb.exe pull /system/app/Settings.apk Settings_original.apk
adb.exe pull /system/app/Phone.apk Phone_original.apk

Step 3:
Select the Flash option on the recovery, and select to choose the file name
Select the power_control_v2.01.zip
Confirm and wait for it to finish.
Reboot the phone.

Step 4:
Add the new Power Control widget
 
Mroqui
Old
#3  
Junior Member
Thanks Meter 0
Posts: 5
Join Date: Mar 2008
Thank you verry much !
 
futango
Old
#4  
Senior Member
Thanks Meter 4
Posts: 347
Join Date: Oct 2008
Location: Portland, Or
Is this the app from BK Mobility? Of so, this would be considered a WAREZ and you will get banned for it, because it is an paid app.
Device: Samsung Galaxy S III
Rom: LoserRom 1.3.2
 
anwoo
Old
#5  
Member
Thanks Meter 0
Posts: 71
Join Date: Apr 2010
to futango:

Can you even READ?
 
Serris
Old
#6  
Serris's Avatar
Senior Member
Thanks Meter 23
Posts: 341
Join Date: Feb 2010
Location: Test chamber No.4
Any screens?
Nexus S i9023
CM10 Nightly
 
piafinho
Old
#7  
Member - OP
Thanks Meter 4
Posts: 54
Join Date: Aug 2009
Now it has
 
futango
Old
#8  
Senior Member
Thanks Meter 4
Posts: 347
Join Date: Oct 2008
Location: Portland, Or
Quote:
Originally Posted by anwoo View Post
to futango:

Can you even READ?
Sorry OP. Was tired when reading.

That thing looks great BTW.
Device: Samsung Galaxy S III
Rom: LoserRom 1.3.2
 
TuMatos
Old
#9  
Member
Thanks Meter 5
Posts: 90
Join Date: Sep 2009
installed. looks good and works. very nice and thanks.

can i add a suggestion? possibility to reorder the buttons
 
virnik
Old
#10  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: Jul 2010
When i do
Code:
# mount /system
i have error: device or recovery busy ...
What now ?

 
Post Reply+
Tags
control, cyanogen, data, mobile network, power, toggle, widget
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS