[APP] Automate your bluetooth - Your Portfolio

Hi there,
i have created the following app for automating bluetooth through timers, WIFI and NFC, Website with download link: http://fanciulli.squarespace.com/autobluetooth
Essentially you can set conditions and have bluetooth on or off when such conditions are met.
As an example you can set a condition for having your bluetooth on when you leave a certain WIFI network (like your home network).
I made autobluetooth to have BT on when leaving home on my car. I can have bluetooth exactly when i need it by simply adding a timer condition.
Hope you find it useful!
Regards,
Massimiliano

Will try out and let you know
keep up the good work.

Related

[REQ] Disable mobile network when wifi connected

I am looking for an app that automatically switches off the cellular radio when wifi is connected and switches it back on when wifi loses connection. I'm not talking about the APN data connection which already does that, I'm talking about the regular cell phone connection.
According to my lack of results searching through the forums, Market, and Google, such an app does not exist yet. Currently the best app I've found to do anything remotely like this is the Airplane Mode Wi-Fi app, which is a manual switch and a slightly cumbersome one at that, not nearly good enough for how often I go in and out of wifi.
The reason I ask for this is because I use Google Voice with SIP and a prepaid plan. I want to use SIP as much as possible to save my prepaid minutes for when I really need them. When wifi and cell are both connected with Sipdroid running and I receive a call, they both ring at the same time. To be sure I don't accidentally use prepaid, I usually reject the call and call back over SIP, which is slightly annoying for both me and the caller.
Might someone be willing to create this app? Or better yet, does it already exist and I just wasn't doing the right searches?
You can turn the phone radio off with code but you need to use non-public apis and probably extra permissions. For anyone interested, have a look at RadioInfo.java (Phone Info when selecting an activity with AnyCut).
I'll add the option to the Airplane Mode Wi-fi Tool.
It was simple, I'm testing it right now, then I'll update it in the market as soon as it works properly.
UPDATE: Done, go download "Airplane Mode Wi-Fi Tool" (free) from the market if you'd like to stay updated from there, otherwise install it from the attachment here.
It only enables airplane mode if it successfully connects to a Wi-fi network, if it disconnects, connection gets dropped, or wi-fi gets disabled from the settings or widget, the phone goes back to regular radio mode.
Make sure to check the Preferences and enable/disable it according to your preferences. It's disabled as default.
Enjoy!
Perfect! Airplane Mode Wi-Fi Tool has become one of my top favorite apps with this feature. Thanks!
cant' find it on the market
sorry: I needed to search for the translated name
zorxd said:
is this app still available on market? Can't find it.
Click to expand...
Click to collapse
It is, Market link -- Airplane Mode Wi-fi Tool
Also, you might be interested in this one, Market link - AutoAP
I found the application on the market, however it doesn't behave as expected. I have to manually switch to airplane mode, and then enable wifi.
What I would like is a single switch to enable wifi AND disable the cellular radio.
And then a single switch to switch back to cell radio with wifi off.
I will try autoAP, thanks
How hard is it on the battery if I always leave wi-fi on even when not used?
autoap seems just fine, I just have to disable wifi to automatically enable cell radio
thanks
However I think, from a marketing point of view, you should consider a better name. Auto AP sounds like Automatic Access Point to me.
Yeah, works fine on tablets without internal 3G. This provides a battery saver.

Application for Bluetooth PAN tethering -- now for charity

The ad revenue from this app has passed the $25 mark -- what it cost me to register with Google to put the app in the market. As promised, any revenue the app earns from that point forward will be added to my annual donation to the Baypath Humane Society of Hopkinton, Massachusetts -- a no-kill shelter.
Thanks from me and thanks from the kittens and puppies.
----------
I've written a widget to establish a PAN connection between the Nook a phone. It grabs the first networking-capable device it finds in the list of pairings. A couple of things to note:
There is an application. All it will do is show you what device, if any, it can connect to. It has to turn on Bluetooth to get the list, but it will politely ask you before doing so.
The widget will turn on Bluetooth, but it isn't so polite. For the life of me, I can't find a code snippet nor can I think of one that will start the polite activity (or any activity) from a widget that doesn't directly involve a button press. If anyone has such a snippet, I'd love to see it. I know its possible because the Bluetooth GPS widget does it. Fixed!
The widget, of course, requires root.
I do send a Toast when the process is complete, but toast from my widget isn't reliable. I need to figure that out, too... advice is welcome. Fixed!
Still to do: Monitor the connection and reflect the status in the widget. Fixed!
If nothing else, it's prettier than a GSCript script. Once it's stable and complete, I'll stick it in the marketplace.
Note... You must be running CM7 and you must have already paired the phone before you can use this....
Apr-13: New version with better Bluetooth device state management.
Apr-17: Added connection monitoring, polite Bluetooth enabling
Note: The pop-up to grant superuser access is asynchronous, so there may be a timing window on first use where state is not correctly monitored. I'll try to work that out, but in the meantime, all subsequent uses should work.
The icon will display a yellow LED during the connection process and a green one once the connection is going.
If a connection could not be established, the LED may go briefly green, then turn off. The challenge is that the only way I can monitor the connection is with "pand -l" or "ifconfig bnep0" and if the connection is gone, the attempt to read the result from those commands simply hangs. So, I start a thread and then periodically run "pand -l". A different thread monitors the first and, if it looks stuck, I kill the process and turn off the LED. But, until I can be sure it's really stuck and not just taking time to answer, the LED will be green. Fixed!
Obviously, once the connection is broken, the LED will go off.
Since I have the LED, I've taken out most of the toast, though some still comes from the OS.
Apr-19 Fixed the widget graphics so the LED turns off instead of disappearing. Fixed the green-before-failed connection status issue. Added a proper toggle -- if the connection is off, tapping the widget turns it on and if the connection is on, tapping the widget turns it off.
Apr-20 The official version is now in the Market:
https://market.android.com/details?id=earlmagnus.nctether
May-27 Fixed a null pointer issue discovered by Ophbalance
As always, feedback is welcome.
Could you accomplish the blue tooth polite toggle with a conditional method?
Check blue tooth status,
if off, direct user to settings-> blue tooth
I know thats not as cool as a nice button press
Downloadin ur app now!
One other oddness...
... Android doesn't seem to think the tethered connection is worthy of note. If you start the browser after being connected, you'll be told you have no connection. Pages will load perfectly well, anyway.
sinanju said:
... Android doesn't seem to think the tethered connection is worthy of note. If you start the browser after being connected, you'll be told you have no connection. Pages will load perfectly well, anyway.
Click to expand...
Click to collapse
I'm pretty sure it's because Android does not natively have bluetooth DUN capabilities, at least input-wise; it's based on functions within custom kernels, and therefore the system does not recognize it as a connection capable of fueling GApps.
But I could be completely wrong / that information could be outdated; this is from my research into Bluetooth DUN for my Nook when I first got it a while ago, and I'm not much of a developer. I'd more call myself someone who likes dabbling with code, and watching everything break.
But back to this post's point: thank you so much, you are a god. I've been looking for an easier way to do this for so damn long.
Kudos, sir. Kudos.
This is very promising! Now, what is the feasibility of adding Bluetooth DUN support? A number of phones out there (to include Blackberries) do not support PAN. I've done a lot of googling and have come across one resource, which may or may not be useful: https://github.com/wertarbyte/android_vendor_cyanogen/blob/omni-tether/prebuilt/common/bin/tether
The "pand" binary is included with the CM7 ROM, but "dund" is not. How much effort would be involved in adding this functionality?
Thanks in advance and appreciate any guidance..
exactly what i was looking for.
Thanks a lot for this. Will be installing and tethering to my iphone via mywii
I will report back with results.
anonim1 said:
This is very promising! Now, what is the feasibility of adding Bluetooth DUN support? A number of phones out there (to include Blackberries) do not support PAN. I've done a lot of googling and have come across one resource, which may or may not be useful: https://github.com/wertarbyte/android_vendor_cyanogen/blob/omni-tether/prebuilt/common/bin/tether
The "pand" binary is included with the CM7 ROM, but "dund" is not. How much effort would be involved in adding this functionality?
Thanks in advance and appreciate any guidance..
Click to expand...
Click to collapse
DUN is in a whole different ballpark. I don't know what's involved.
Thanks, folks, for trying it out. I have an idea for monitoring connection status, but other than some POC work, I probably won't get to it before the weekend.
It doesn't work for me, it says tethering then tethered and then starts tethring again and this goes on quite sm time and then the internet doesn't work, i really needed this:-(
am running pherimod 5.3 and trying to tether with sony erricsion's k530i which has bluetooth networking.
rigy73 said:
It doesn't work for me, it says tethering then tethered and then starts tethring again and this goes on quite sm time and then the internet doesn't work, i really needed this:-(
am running pherimod 5.3 and trying to tether with sony erricsion's k530i which has bluetooth networking.
Click to expand...
Click to collapse
Does the application show the the phone and its BT address?
Is there a particular app you have to start on the phone before you begin tethering and, if so, does it show status if a link is established?
EDIT: Also... have you used the phone for tethering before with a laptop? Do you know tethering should work?
For the life of me, I can't think of anything that would make it loop through connection attempts other than mashing the widget repeatedly.
sinanju said:
Does the application show the the phone and its BT address?
Is there a particular app you have to start on the phone before you begin tethering and, if so, does it show status if a link is established?
EDIT: Also... have you used the phone for tethering before with a laptop? Do you know tethering should work?
For the life of me, I can't think of anything that would make it loop through connection attempts other than mashing the icon repeatedly.
Click to expand...
Click to collapse
Yes phone and address are both shown, i start tethring by taping the widget and as for the status i see nothng xcpt bluetooth icon, which shows that both the devices are connected. But am trying this with a gprs connection. i havent tried 3g yet, will that be any different?
Yes the phone has bluetooth tethring, the pc suite has a module for bluetooth internet.
I've attached a new version in the OP. Have a try.
I've improved managing the Bluetooth device. Final state of the connection still isn't reported... that will have to wait.
I would remove the widget and uninstall the old app before installing the new version.
Hm... pand --nodetach doesn't do what I hoped it would in a --connect context... So much for that idea.
I'm trying to use this app to tether my nook to my moto Droid. When I tap the widget it says there's no paired PAN device. I've tethered these two before using the pand command, so I know it's possible. Am I doing something wrong? The droid and nook are "paired but not connected", but every Bluetooth device has said that.
Sent from my NookColor using Tapatalk
Calla969 said:
I'm trying to use this app to tether my nook to my moto Droid. When I tap the widget it says there's no paired PAN device. I've tethered these two before using the pand command, so I know it's possible. Am I doing something wrong? The droid and nook are "paired but not connected", but every Bluetooth device has said that.
Sent from my NookColor using Tapatalk
Click to expand...
Click to collapse
They were probably paired while the droid wasn't advertising the profile. I rely on the list of paired devices knowing which is the network provider.
Try this:
- Remove the Droid from the list of paired devices on the Nook
- Enable visibility on the Droid
- Get the Droid ready for a PAN connection
- Then, from the Nook, initiate pairing
That should ensure the Nook sees the Droid can provide a network connection.
Now I just need my phone to just advertise the bluetooth network without having to run wifi tether.
painter_ said:
Now I just need my phone to just advertise the bluetooth network without having to run wifi tether.
Click to expand...
Click to collapse
Nothing WiFi related will help you.
My WinMo 6.5 phone just shows a list of nearly a dozen profiles it supports, PAN being one of them. My suggesting about getting the phone ready for PAN before pairing came from my experience setting up my Ubuntu system as a tethering client. Both that and the Nook recognized the PAN profile when I did that.
The only app I could find that supports bluetooth tethering and is reliable on my HTC Hero is wifi tether set up in bluetooth mode. I have been using it for over a year with my netbook.
What would make the bluetooth tethering the cat's ass would be to not to have to start anything on the phone, for the connection to always be available so i could just wip out the nook and be able to use the data connection.
painter_ said:
The only app I could find that supports bluetooth tethering and is reliable on my HTC Hero is wifi tether set up in bluetooth mode. I have been using it for over a year with my netbook.
What would make the bluetooth tethering the cat's ass would be to not to have to start anything on the phone, for the connection to always be available so i could just wip out the nook and be able to use the data connection.
Click to expand...
Click to collapse
Can't help you there... that's up to the phone.
In my case, it's an HTC Topaz and I have to start an app on that, too...
I am happy to report it works well with mywii running on my iphone and tethering from the nook.
Did not have any issues at all. And yes, i did have to hold my iphone the right way

[Q] How to automate Bluetooth GPS?

Hey all.
I have a good Bluetooth GPS receiver (accurate to 1.5 feet usually and instant locks) and it works great with all my GPS navigation apps. But the process of using it should be more automated.
The steps needed to use it are:
1. Turn on GPS (Phone GPS)
2. Turn on Bluetooth
3. Run a Bluetooth GPS program such as Bluetooth GPS Provider
4. Press connect/start service/etc in the program
5. Run your navigation program.
6. When done, turn off Bluetooth, GPS, and the Program Service.
Now, I HAVE Tasker. I'm asking for help in automating this rather long list.
So far I've set up a Tasker Widget which toggles the Phone GPS and Bluetooth when pressed. That takes care of step 1 + 2. I also have a widget from Bluetooth GPS Provider which starts the service when toggled-steps 3 + 4. Then I run my fav GPS navigation app- step 5. Anyone know of automating this more?

[Q] Block Wifi if VPN is down?

I want to ensure nothing on my phone as access to wifi if my vpn is not connected. Anybody know how I could achieve this?
Any ideas greatly appreciated.
You might want to give Tasker a try. Llama (it's free / haven't used it though), or another Task automation tool might work too. It depends on how the app works, but you may have to do one or two things manually. For instance
Example Pseudo-code:
Code:
IF VPN app OPENED (
TURN OFF WIFI
SET VARIABLE vpnfrontend=1)
IF VPN app LOSES FOCUS (closed) (
ASK "Is VPN Enabled?"
IF YES (
ENABLE WIFI
SET VARIABLE vpnfrontend=0 )
IF NO (
SET VARIABLE vpnfrontend=0 ) )
That's the best I can think of off the top of my head.
Hope this helps!
Thanks for the reply closeone.
I purchased Tasker a couple of days ago. Hopefully I'll be able to do this - afraid there are going to be some manual steps though. I bought WifiJumper to auto connect to hotspots (known or unknown) so my wifi phone (Samsung Galaxy Player YP-G70) would be more like a cell phone. I thought if I could get OpenVPN working on my phone it automatically tries to reconnect but it is sometimes a slow process - thereby leaving my wifi connection open for a minute or so.
The ultimate goal here is: Android is a lot like CarrierIQ in that it tracks every IP you log in from. So I want to use a vpn so the IP I login from is the same one no matter where I'm at. I'm not a hacker, pedo, or even using P2P - I just want my privacy. Kind of a principal type of thing.
Your code is similar to what I was thinking of but.... I'm thinking I won't be able to check to see if VPN is enabled and then turn on wifi because the vpn requires wifi access to connect.
I'm still new to Android but so far the only tool I see to block wifi access is Airplane Mode and I think it blocks all apps (including the vpn). Maybe pdroid or Droidwall have some options for what I want to do????
Got to thinking if Droidwall had profiles I could build a profile that had wifi blocked for everything except Vpn. Then use Tasker to check to see if vpn was up. If not then set Droidwall to that profile. Problem is I don't think there is a way to run Tasker rule constantly. So there would be data leakage.
Sent from my YP-G70 using Tapatalk

Bluetooth Auto Connect App

Hello, i use bluetooth for tethering my Prime with my Desire HD because it consumes less battery than using WIFI-Hotspot. The Problem with this was that the Transformer does not automatically connect to the phone when enabling bluetooth.
So i wrote an App that does exactly this. It reacts on the bluetooth_state_change broadcast and then connects to the phone. The App uses some hidden Api-Calls but seems to work well.
Since i don't have a market account yet, i thought it would be a good idea to upload it here. I attached the apk and the source.
Please comment!
EDIT: Seems to work with any bluetooth device, see posts below
EDIT2: This version is outdated. Please search "Bluetooth auto connect" by refluxa in Google play. I can't post any links here yet. Also it only works with Honeycomb or higher.
redeye86 said:
Hello, i use bluetooth for tethering my Prime with my Desire HD because it consumes less battery than using WIFI-Hotspot. The Problem with this was that the Transformer does not automatically connect to the phone when enabling bluetooth.
So i wrote an App that does exactly this. It reacts on the bluetooth_state_change broadcast and then connects to the phone. The App uses some hidden Api-Calls but seems to work well.
Since i don't have a market account yet, i thought it would be a good idea to upload it here. I attached the apk and the source.
Please comment!
Click to expand...
Click to collapse
THANK YOU!!!!
This is very nice. I tried it and it works perfectly with my GNex, which I've basically been using constantly because wifi sucks. BT tether is the way to go.
redeye86 said:
Hello, i use bluetooth for tethering my Prime with my Desire HD because it consumes less battery than using WIFI-Hotspot. The Problem with this was that the Transformer does not automatically connect to the phone when enabling bluetooth.
So i wrote an App that does exactly this. It reacts on the bluetooth_state_change broadcast and then connects to the phone. The App uses some hidden Api-Calls but seems to work well.
Since i don't have a market account yet, i thought it would be a good idea to upload it here. I attached the apk and the source.
Please comment!
Click to expand...
Click to collapse
Hey thanks. Works great. I use it in combination with bluetooth headset Jabra bt3030. So simple yet so effective.
Maybe you should rename the thread. It's not only good for tethering as you can see
Hi,
sorry for my late answer. Thank you for the comments. I'm glad to hear that it is useful for you, even though i don't know why it works with headsets. I explicitly select the Bluetooth PAN (Personal Area Network) Profile.
Also i registered a developer account now and i think i will publish it there in the next days.
Looks like a very promising app. I tried it, but it crashes periodically on my AT&T Galaxy Note when I turn bluetooth on. Also, the bluetooth connected devices appear disabled - they are a very light color on a white background.
I'd love to help with this, let me know if you need more info or assistance.
Please see updated first post. You will have to wait until Samsung brings your device to ics.
Hello, I have SGS2 with ICS ROM. I have installed Bluetooth Auto Connect from Google Play because my phone doesn't want to connect to my BT car hands free automatically (manual connect always works). The auto connect app shows the name of my hansfree but the selection is unfortunately disabled. Can you please enable also other BT profiles (not only PAN) in your application? It can be very useful for another BT devices too.
Is there any way this app could allow for multiple device selection and have it recognize a "friendly name?" (if you rename the device in your BT panel)
This works great for me in my car to connect my BT, but I have a second transceiver that I use in my house that is identical, so it has the same name, and the software seems to randomly pick one of the two when BT powers up.
Allowing checkboxes for a multiple device selection to start up the BT connections would probably be enough for me, as then "random" will get both every time.
I just updated the app. Now it has support for Tasker / Locale and Multiple Devices!
redeye86 said:
I just updated the app. Now it has support for Tasker / Locale and Multiple Devices!
Click to expand...
Click to collapse
I just found this great app trough a post on the Tasker forum and installed it immediate.
I noticed that if you manually start the app it will ask you to enable BT, but is you use the Tasker plugin it doesn't enable BT.
Of course you can enable BT using Tasker before using the plugin, it would be nice if the plugin had an optin to enable BT.
Beside that, thanks for this great app/plugin.
kantjer said:
I just found this great app trough a post on the Tasker forum and installed it immediate.
I noticed that if you manually start the app it will ask you to enable BT, but is you use the Tasker plugin it doesn't enable BT.
Of course you can enable BT using Tasker before using the plugin, it would be nice if the plugin had an optin to enable BT.
Beside that, thanks for this great app/plugin.
Click to expand...
Click to collapse
Hello,
i will have to ponder on that because tasker / locale developers say that functionality that is already offered by their programs should not be reimplemented in plugins. On the other hand i also see that some users have problems because they do not know that they have to enable bluetooth first. I think i will add a little notice at least.
Have you got a guide (or a link to one) to setup bluetooth tether (HTC One X to Transformer) so I can use this app?
Do you need root on the phone to do it?
Hello, sorry but i just overlooked your post. In general its a good idea to do the whole stuff manually once. First you have to pair your devices and enable bluetooth tethering on the phone (On my non-Sense-Phone: Settings -> More... (in Wireless & Networks Section) -> Tethering and mobile Hotspot). Then on the tablet open the configuration dialog using the button with the three controllers beside the entry of your phone in the bluetooth dialog. Select "use for internet connection". Go back to the previous menu and click on the entry. Now you should be able to use the phones internet connection. This is the point where the apps come into play: The auto tether app enables bluetooth tethering on the phone after reboot (is disabled automatically) and the auto connection app simply initiates the bluetooth connection when enabling bluetooth.
Fantastic app! So useful in conjunction with tasker
I was wondering if there were plans to add a complementary feature: i.e. the possibility to autodisconnect a specific BT device. I'm looking for an app that allows me to do that via tasker to be able to toggle my BT headset connection between my phone and my tablet. I don't think any app can do that yet?
Hello,
it has disconnect functionality now (Version 0.6)!
redeye86 said:
Hello,
it has disconnect functionality now (Version 0.6)!
Click to expand...
Click to collapse
Many thanks for this addition!!
Hello, thank you for your app.
Unfortunately it crashes to me. I set it up so to connect to a joypad (that is, the iPega controller mentioned here: http://forum.xda-developers.com/showthread.php?t=2033780 ).
When I turn bluetooth on, "unfortunately the application has died unexpectedly".
Just reporting.
Thank you very much

Categories

Resources