FORUMS
Remove All Ads from XDA

[SOLVED] Toggle Wi-fi with Long Press of Search Soft Key?

25 posts
Thanks Meter: 1
 
By HaggleLad, Junior Member on 26th April 2010, 11:04 AM
Post Reply Email Thread
Hi all,

I would absolutely love to be able to toggle my Android wi-fi connection with a long press of the search soft key. This would be ideal when launching some app that would benefit from a faster connection and would save me returning to the home screen, activating the wi-fi and then returning back to the app.

I've searched everywhere to find an app, or combination of apps (Button Shortcut + something else) that could achieve this but have hit a dead end.

Anyone know of an app that could achieve this?

Alternativily I do have the Android IDE set-up at home, does anyone know how I can hook the long button press (from within all app's) and toggle the wi-fi connection?

Thanks in advance,
Nexus One user (I'm not rooted)
 
 
28th April 2010, 08:20 AM |#2  
OP Junior Member
Thanks Meter: 1
 
More
Ok, so I've come to the conclusion there's no apps out there at the moment that will do this so I have started writing my own.

I have successfully hooked the search button and can get a basic activity launched with a long press of the search key from the home screen and within other apps.

All I need now to is to find the code that allows me to enabled/disable wi-fi. Can anyone point me in the direction of a good example?

Thanks, will share my app once its finished!
29th April 2010, 04:28 PM |#3  
OP Junior Member
Thanks Meter: 1
 
More
I now have this working on my Nexus One, needs a couple of tweaks but it's nearly ready to release to the Android Market.

Would anyone care to do a bit of beta testing for me? If so I can PM the apk once it's ready.

Also, if appropriate can a mod please move this into the "Android Apps and Games" forum.
4th May 2010, 10:49 AM |#4  
OP Junior Member
Thanks Meter: 1
 
More
I have now released this to the Market as "In-App Wifi Toggle".
4th May 2010, 12:54 PM |#5  
Senior Member
Flag Fortaleza
Thanks Meter: 18
 
More
awesome app, thanks for sharing!
4th May 2010, 12:55 PM |#6  
OP Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by raviff

awesome app, thanks for sharing!

Thanks, glad someone likes it!
Can you tell me what phone and version you're using and what button you're using to activate the app?
4th May 2010, 02:19 PM |#7  
Senior Member
Thanks Meter: 0
 
More
I like it. I'm using an N1. I put it on the search soft key.
5th May 2010, 01:38 PM |#8  
Junior Member
Thanks Meter: 1
 
More
Re: [SOLVED] Toggle Wi-fi with Long Press of Search Soft Key?
Works great on my HTC Legend with 2.1 Sense!

Thx!


Sent from my HTC Legend using the XDA mobile application powered by Tapatalk
6th May 2010, 06:26 PM |#9  
Vermithrax's Avatar
Senior Member
Flag Mobile, AL
Thanks Meter: 4
 
More
Very nice... Has anyone tested this on a G1?

I have been using the Toggle WiFi app set to the keyboard shortcut (search-w) but this seems a little more "fluid"...
6th May 2010, 06:30 PM |#10  
Senior Member
Flag Richmond Hill,Ga
Thanks Meter: 0
 
More
love it great idea fast easy way to turn wifi on and off
6th May 2010, 07:03 PM |#11  
OP Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by Vermithrax

Very nice... Has anyone tested this on a G1?

I have been using the Toggle WiFi app set to the keyboard shortcut (search-w) but this seems a little more "fluid"...

I have a friend with a G1 who's been doing some testing for me. The version on the market at present will only work on a short press of the green/call button. The search button on the pull out keyboard doesn't work. Now obviously a short press of the green/call button is normally assigned to shortcut to the phone app and most people won't want to re-assign this and so I have made some adjustments so it will now work on a long press of the green/call button. I will be releasing this update to the market in the next couple of days when I get a moment.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes