[NEW APP] In-App Wifi Toggle

Search This thread

avimak

Senior Member
Nov 23, 2008
488
1
Hi,
great idea!

Can you please add long-press the trackball button as an intent?
I'm aleady using long-press the search button to launch the dialer and there is no "call" button on the nexus.

Thanks ;)
 

tatrai

Member
Nov 9, 2009
13
0
Great app, working fine on non-rooted HTC Legend... An absolute 5 star app for me, to be honest, I didn't even realise how much I missed it until I found it here...:eek:

keep up your work!

thankfully:)

tatrai
 

luckycook82

Senior Member
Aug 11, 2009
117
3
Fairfield, CA
www.cashdailyvip.com
Great Job!!

I really like this, But I was wondering if there was a way to set it up to give us a long press on the track ball as an option. I have a nexus one and I already have my search button set up for voice search when I long press.. and I don't have a call button. Anything else and I would be using this all the time. I absolutely hate that the only way to toggle wifi is to go to my home screen.. This is a beauty of an app. Keep up the great work.
 

lubeix

Member
May 24, 2010
5
0
Dubai
Confirmed Working!

thanks, this app is a real time saver, confirmed working on motorola milestone using the "long press search button" i can't test the call buttons because i don't have them on my phone
 

mblaster

Inactive Recognized Developer
Aug 2, 2007
433
95
Works partially on G1 (SuperBadCM5 1.3)

-Search butten doesn't work, but this seems to be known
-doesn't work in opera mini, as it remaps call button to 'mouse pointer right'

Very useful app, would be great though if it worked in opera. Thougth about using long press menu? It doesn't seem to be mapped to anything.
 

HaggleLad

Member
Jan 14, 2010
30
3
www.oliverpearmain.com
Hi all,

Thanks for your feedback. Please note that there there is no trickery used in this app. I merely declare in the AndroidManifest.xml that this app is a candidate to be launched with the buttons in question and the Android OS does the rest. I am not a fan of employing dirty hacks to hook buttons as this produces unexpected results and can interfer with other apps. The Opera browser app is an example of exactly one such app, it hacks a number of keys including the search soft key & call button and this is why my app, or indeed any other app that you have legitimately wired to the search soft key or call button, will NOT work within Opera. There is nothing I can do about this myself. I have emailed the development team to let them know of the issues they are causing and its entirely up to them to fix it, or not.

Please note I am hoping to have a long press of the camera button wired up soon using a BroadcastReciever. I am ensuring that I implement this correctly however because I don't want it to interfer with its standard short press operation!

Additional answers below. Really appreciate the feedback, please keep it coming!
Also please consider donating by buying "In-App Toggle Donate" or at least leave 5 stars and comment on the free app's if you can, its much appreciated!

Thanks


Okay, so the HTC Incredible has no call button, and a long press of the search button is defaulted to activating the voice input for search. How about a long press of the Back button (which is the only button that does not already have a long press function)?

I assume you aware you can replace the voice input with my app using defaults or alternatively not select a default so you are presented with a Voice Command/Wifi Toggle option?
The back button is a system button and there is no way to hook it that I know of . If there were it would be a dirty hack and this is not something I'm prepared to investigate at present.
I'm in envy of your Incredible, not an option here in the UK :-( Does it have a camera button?


Just installed on my HTC Incredible works with the long pressing of the search button. When you press the search button long it brings up (complete action using either the search or In-app wifi). It will turn on and off the wifi but doesn't connect the wifi stays in 3g mode. I have to go into settings/wireless & Networks/WI-FI settings and then it connects. So lets say if the WiFi is turned on and i use IN-APP WIFI it will turn it off just fine. If i try to turn it back on using IN-APP WIFI it will not revert unless i go into wifi settings. Great idea though sir i hope you can get it to work on the incredible

!!!!!!!!!!!!!!!!!!!!!!Update i uninstalled it Cycled my phone off and on reinstalled it worked fine for awhile then went back to Lagging. Don't know if it conflicts with HTC's Wifi widget.

Please can I emphasise that my app merely toggles wifi ON and OFF. It takes no responsibility for connecting to a network, obtaining an IP address etc. You have stated that my app enables Wifi on your phone, so my app has in-fact worked exactly as expected :) If your phone is failing to connect to your network then I can only assume that there is some other problem occurring, or as you have mentioned, some other app is causing the issue.


Hi,
great idea!

Can you please add long-press the trackball button as an intent?
I'm aleady using long-press the search button to launch the dialer and there is no "call" button on the nexus.

Thanks ;)

Please see my comments with regards the back button above. Again the trackball is a system button and performs different actions depending on the phones current context. A long press will frequently be the equivalent of long press on the screen, to bring up a context menu. Using hacks as well as handling scenario's like this would be impossible and produce unexpected results. Apologies but I can't implement this.


I really like this, But I was wondering if there was a way to set it up to give us a long press on the track ball as an option. I have a nexus one and I already have my search button set up for voice search when I long press.. and I don't have a call button. Anything else and I would be using this all the time. I absolutely hate that the only way to toggle wifi is to go to my home screen.. This is a beauty of an app. Keep up the great work.

As above, perhaps don't select a default for the search soft key long press? Sorry the trackball isn't possible.


Works partially on G1 (SuperBadCM5 1.3)

-Search butten doesn't work, but this seems to be known
-doesn't work in opera mini, as it remaps call button to 'mouse pointer right'

Very useful app, would be great though if it worked in opera. Thougth about using long press menu? It doesn't seem to be mapped to anything.

Hi, I apologise because in my app description I have put "Search Button" when what I really should have put was "Search Soft Key". Unfortunately these aren't the same thing and I am aware that the search button on the G1 keyboard doesn't activate my app. I will update the description shortly.
Please see my comments above regarding Opera and its dirty hacks. If it hijacks buttons when it has focus there's nothing other apps can do about it unforuntately.
A long press of the menu key is actually mapped to bring up the soft keyboard.
 
Last edited:

kevin@TeslaCoil

Senior Member
May 19, 2010
498
5,110
Chicago
teslacoilsw.com
I am not a fan of employing dirty hacks to hook buttons as this produces unexpected results and can interfer with other apps. The Opera browser app is an example of exactly one such app, it hacks a number of keys including the search soft key & call button and this is why my app, or indeed any other app that you have legitimately wired to the search soft key or call button, will NOT work within Opera.

Are you sure it is a dirty hack and not just an allowed but rare behavior? This blog entry [ android-developers.blogspot.com/2009/12/back-and-other-hard-keys-three-stories.html ] suggests onKeyLongPress is legit to capture long key presses in app, though it calls them hard keys but then later it says the virtual keys look like hard keys so I'd assume onKeyLongPress would work for overriding them in app and is a support (non-hack) method of doing so. Still nothing you can do about it, and it doesn't look like Opera needs the long press.
 

HaggleLad

Member
Jan 14, 2010
30
3
www.oliverpearmain.com
Are you sure it is a dirty hack and not just an allowed but rare behavior? This blog entry [ android-developers.blogspot.com/2009/12/back-and-other-hard-keys-three-stories.html ] suggests onKeyLongPress is legit to capture long key presses in app, though it calls them hard keys but then later it says the virtual keys look like hard keys so I'd assume onKeyLongPress would work for overriding them in app and is a support (non-hack) method of doing so. Still nothing you can do about it, and it doesn't look like Opera needs the long press.

Thanks for the link, an interesting article. Unfortunately that relates to capturing key events when your application is the application in focus and don't think it applies to a 'listen always' situation. This is presumably the technique that Opera abuses. Also it only applies for 2.0+ devices and my application is backwards compatible to 1.5.
Please note I am a complete novice Android developer, coding complex hooks has a learning curve, takes time and effort and at the end of the day I am just providing these apps for free.

Hey could you make a gps one aswel thanks heaps

-------------------------------------
Sent from my Nexus One

A GPS toggle is definitely something I would love to implement but unfortunately Google have deliberately removed the ability to enable/disable a users GPS connection from the Android API. Developers are recommended that their app instead direct to the GPS settings screen if GPS is required. If you search for "toggle GPS" in the market you will see that those app's listed do exactly this, even Google Maps does this.

There are app's out there that are using some kind of hack to enable the GPS. The "Setting Profiles" app that I use is able to enable/disable GPS for instance but I have absolutely no idea how its done and my emails to the developers have been unanswered. I will continue investigating and see whether I can suss it out.
 

alovell83

Senior Member
Jun 29, 2010
731
33
Lippstadt
I've just released my first app to the market. I would appreciate if some people could test it for me on different Android versions/phones?

"In-App Wifi Toggle"

Once installed you can enable or disable your Wifi connection instantly from any context (ie in the Browser application, from the home screen) by either

a) Long pressing the Search button
b) Pressing the Call button

A nice toast message is displayed stating whether the Wifi connection was enabled or disabled.

I wrote this app because I was fed up of launching an app, realising it would benefit from Wifi being enabled, having to return to the home screen, activate Wifi with the Power Control widget, long press the home button and select the app again to return. This app bypasses all of that with a single button press and doesn't interupt the application you're already in.

Would appreciate your feedback! Thanks!


I think it's good you did this, this can come in handy for people that don't like/have room for extra widgets. However, I really like the Android Power Control widget. I think this comes stock, but it might have come in the "Spare Parts" app, it allows single click to (de-)active: wifi, gps, bt, brightness +1 more which I think is a sync button, but I'm not sure. So, if you haven't used it, test it out and see if you can make that better! Then, I'll be out there promoting your stuff. If not, maybe it'll still help you with what you've got going on. GL
 

HaggleLad

Member
Jan 14, 2010
30
3
www.oliverpearmain.com
I think it's good you did this, this can come in handy for people that don't like/have room for extra widgets. However, I really like the Android Power Control widget. I think this comes stock, but it might have come in the "Spare Parts" app, it allows single click to (de-)active: wifi, gps, bt, brightness +1 more which I think is a sync button, but I'm not sure. So, if you haven't used it, test it out and see if you can make that better! Then, I'll be out there promoting your stuff. If not, maybe it'll still help you with what you've got going on. GL

I am fully aware of the stock power control thanks, its on my home screen and I use it everyday. Don't see the relevance of this to my app however, I had a specific need to toggle wifi from with-in an application and the power control widget (or any widget for that matter) just wasn't cutting it so 'I made this'.
 

mdneilson

Senior Member
Sep 3, 2007
367
56
MN, USA
I am also a learning developer. Have you considered open sourcing this. I would be more than happy to help just for experience (you can keep the donations) :D