Bluetooth OR Wi-fi toggler


Last Updated:

  1. kwaping

    kwaping Well-Known Member This Topic's Starter

    Joined:
    Nov 10, 2009
    Messages:
    195
    Likes Received:
    34
    Hi dev people,

    I'm a programmer but don't have time to learn Android programming right now, so I'm going to gift you with this idea. All I want in return is a free copy. :)

    I noticed that most of the time when I'm using bluetooth, I'm not in a wi-fi area. (Walking the dog with bluetooth headphones, or in my car.) I also noticed that when I'm using wi-fi, I'm almost always not using bluetooth. (Work, home, etc.)

    My idea is for a small (single-square) widget that works as a three-way toggle with a single press:

    1. Bluetooth on, wi-fi off
    2. Wi-fi on, bluetooth off
    3. Both wi-fi and bluetooth off

    Successive taps on the widget cycle through these three modes.

    I feel like this should be pretty simple to implement. What do you think - interested?
     

    Advertisement
  2. kwaping

    kwaping Well-Known Member This Topic's Starter

    Joined:
    Nov 10, 2009
    Messages:
    195
    Likes Received:
    34
    You could also do a cycle like this:

    1. Bluetooth on, wi-fi off
    2. Both on
    3. Wi-fi on, bluetooth off
    4. Both off

    That might be easier and more intuitive to use, and also more flexible.
     
  3. lexchandra

    lexchandra Member

    Joined:
    Sep 6, 2010
    Messages:
    9
    Likes Received:
    0
    "power control" widget is already good enough to do everything you want.. =)
     
  4. kwaping

    kwaping Well-Known Member This Topic's Starter

    Joined:
    Nov 10, 2009
    Messages:
    195
    Likes Received:
    34
    There are a lot of things that almost do what I'm looking for. However, for me the key is the "single-block" size. That'll leave more room for other things, while maintaining the functionality I want.
     
  5. knaveofspades

    knaveofspades New Member

    Joined:
    May 13, 2010
    Messages:
    2
    Likes Received:
    0
    Tasker in the market should be able to do what you're looking for. It's a bit expensive, but it's very powerful.
     
  6. GTmauf

    GTmauf Member

    Joined:
    Sep 21, 2010
    Messages:
    6
    Likes Received:
    5
    Hey, I saw this app request and wanted to start getting into development on the android platform. So I figured I would give it a shot.

    I currently having it working base on your post about the 4 possible states.

    1. Bluetooth on, wi-fi off
    2. Both on
    3. Wi-fi on, bluetooth off
    4. Both off


    I need to add more images so that you can see the state on the widget as it changes. However it is done and working if you'd like to try it.

    I built it on android 2.0. If this isn't ok, let me know and I will try to make it a lower SDK requirement.
     
    kwaping likes this.
  7. kwaping

    kwaping Well-Known Member This Topic's Starter

    Joined:
    Nov 10, 2009
    Messages:
    195
    Likes Received:
    34
    Hey GTmauf, thanks a lot! I'm a Droid X user so the 2.0 target is no issue for me. You might want to target 1.6 to get a bigger user base, but that decision is yours of course.

    I'm glad I could give you inspiration and I can't wait to see the finished product! :)
     
  8. GTmauf

    GTmauf Member

    Joined:
    Sep 21, 2010
    Messages:
    6
    Likes Received:
    5
    No problem at all! I will look at the 1.6 definitely :).

    I am using a pretty generic icon/widget drawable at the moment, but it will display different colors based on what state the bluetooth/wifi is in.

    If you'd like I can attach the .apk and you can do a manual install to check it out.

    Just let me know and I will post it.
     
    kwaping likes this.
  9. GTmauf

    GTmauf Member

    Joined:
    Sep 21, 2010
    Messages:
    6
    Likes Received:
    5
    Ok, Here it is. Let me know how it works out for you! It is a 1x1 widget. It has the default app icon for now. I will work on getting that changed.

    Also, apparently in 1.6 Google had not yet released the Bluetooth API. So I don't think I can set the SDK version to that.
     

    Attached Files:

    kwaping likes this.
  10. kwaping

    kwaping Well-Known Member This Topic's Starter

    Joined:
    Nov 10, 2009
    Messages:
    195
    Likes Received:
    34
    Thanks for the upload! I am looking forward to the finished product. Would you be interested in open-sourcing this app? I'd like to use your source code as a tutorial. :) But I understand if you don't want to release the source.
     
  11. GTmauf

    GTmauf Member

    Joined:
    Sep 21, 2010
    Messages:
    6
    Likes Received:
    5
    No problem! Have you tried it yet? How's it working out for you?

    I will think about giving you the source. But I will have to clean it up first as I have some redundant stuff in there after methods I no longer use after finding widget's don't maintain state between intent requests.
     
    kwaping likes this.
  12. kwaping

    kwaping Well-Known Member This Topic's Starter

    Joined:
    Nov 10, 2009
    Messages:
    195
    Likes Received:
    34
    Thanks GT. I have to be honest, I haven't installed it yet because I just got the 2.2 update and want to get to know it before throwing new software into the mix. :)

    Are you going to release this into the marketplace?
     
  13. GTmauf

    GTmauf Member

    Joined:
    Sep 21, 2010
    Messages:
    6
    Likes Received:
    5
    Haha, no problem. Just so you know I have 2.2 and it's running on my Droid X no problems! :)

    I'm thinking of putting it in the marketplace, yes. I can let you know in a day or so if I'm going to put it there.
     
    kwaping likes this.

Share This Page

Loading...