Whoa there par’dner! (why the cowboy themed accent? I really don’t know…)
You came here looking for DriveFi, and there really is good info below (including the motivation for writing it) but this blog post has become stale over time. You can find the CURRENT app on the Google Play Store as described in the follow-up blog post here: DriveFi is now available the Google Play Store
Don’t care for long posts?
- Documentation and Downloads can be found here: DriveFi,
- A forum comment with change logs can be found here: Updates
- Link to latest version is available in-app starting with version 1.4
- Please report bugs either in-app or from your computer here: DriveFi Bug Report
Drive-by WiFi connections:
If you have RW’s Wi-Fi+ app installed on your phone, then your device actively seeks out open WiFi access points everywhere you go. There are other apps available in the Play Store to do something similar. These apps setup open WiFi hotspots as “known” hotspots in your device, to be automatically connected to whenever your device sees the same WiFi again in the future. This is a Good Thing for offloading to WiFi as much as possible, but it can be troublesome.
When driving, especially at slow speed through a commercial area in town, your phone may observe many open WiFi hotspots and try connecting to each one as you pass by. The problem here is that you won’t remain close to any one WiFi hotspot for very long: you are just Driving-by.
When your phone attempts to connect to a WiFi hotspot as you Drive-by, your cellular data is momentarily disconnected and often times your phone will functionally operate in its WiFi-calling mode: an incoming call may be dropped or an outbound call may be difficult to perform during this time.
Drive-by Wifi connections can be frustrating, but they can also be prevented.
The obvious manual workaround is to disable your WiFi radio whenever you will be driving. This is simple enough: Open the Settings app, tap “Wireless & networks”, and finally tap “Wi-Fi” to toggle its state.
While this is simple to perform, it is anything but convenient:
- You may forget to DISABLE WiFi as you get into your car
- You may forget to ENABLE WiFi again when you arrive at your destination
- In either case, your Hybrid Calling experience would be less than optimal
- Even if you are diligent about en/dis-abling your WiFi, this drudgery should not be required of you!
Google Play Activities API:
At the 2013 Google I/O 2013 developers conference, Google announced new APIs to enable context-aware applications to detect not just your location, but also what sort of location-based activity you are most likely participating in at any given time: Google Announces 3 New Android APIs
The relevant new API, the Activity Recognition API, “[…] uses the accelerometer and machine learning to discern if a user is cycling, walking, or driving”. This Activity Recognition API continually learns from all users and improves over time without requiring any changes to the applications which use it.
Using the new Google Play Activities API, an automated solution is possible. Taking advantage of the extremely power efficient Activity Recognition features, this automated solution should be capable of detecting when we are driving or not-driving without significantly affecting our battery life.
The automated solution should request the “current activity” periodically and control the state of the WiFi radio for us. It should also prevent the radio from being turned ON by other apps (as some have reported WiFi+ does), as well as preventing the radio from being turned OFF by other apps (like a poorly configured battery saving app). This way the sate of the WiFi radio should nearly ALWAYS be dictated by whether we are driving or not-driving at any given time.
Such a solution should also be easy to enable and disable itself, and to provide notifications to users when the state of the WiFi radio is toggled for us so we always know what is happening with our devices.
Tasker and Third Party Plugins:
There is an application in the Play Store called Tasker which provides an easy method to develop automation scripts for Android devices. These scripts may be exported as proper Android Apps and may be freely distributed by the script author.
Tasker does not provide access to the new Activity Recognition API, though third party plugins exist which do provide access to this API. Unfortunately these third party plugins are not free.
When a Tasker script is export as a proper App, it includes hints that the App requires any third party plugins that were used to create it. The exported app cannot include the plugin directly, and of course plugins must be installed (and purchased, if not free) by anyone who wishes to run a Tasker-based app which utilizes that plugin.
I have developed an application to automate en/dis-abling the WiFi radio as described above. The app polls the Activity Recognition API every ~30 seconds to detect when you are Driving or Not-Driving. When driving, your WiFi radio is disabled; when not-driving the WiFi radio is re-enabled. I used Tasker to create this application (note: you DO NOT need to own a copy of Tasker to use DriveFi) and the non-free 3rd party plugin AutoLocation to connect to the Activity Recognition API (note: you DO need to own a copy of AutoLocation to use DriveFi beyond a 7 day trial period).
- DriveFi is FREE; I have no intention of seeking profit from this app, it is free to download, install and use (If you would like to share the app with others, I would appreciate you doing so only by providing others with a LINK to the file so that they download it directly from me).
- It requires a NON-FREE plugin to provide access to the Activity Recognition API; if a FREE alternative becomes available I would eagerly consider switching to it to make this app 100% free for all users. If you spot a viable candidate for this, please let me know.
- The NON-FREE plugin I used provides a 7 day trial period so you can test this app for a week completely free of charge.
- I am not affiliated AT ALL with the developer of the NON-FREE plugin; I don’t see a penny of the money if you buy it.
The DriveFi app was written specifically with RW members in mind: its functionality is meant to maintain the best Hybrid Calling experience with the least manual effort. I hope you like it!
Documentation and downloads are available here: [DriveFi
To pique your interest, here’s a screenshot of the Setup Screen for DriveFi v1.1 (it looks a little prettier by now)):
Please feel free to post comments, questions, bug reports, (bug reports should go here instead) or feature requests as comments to this post.
I hope you enjoy using DriveFi!