Try using Tasker. The best automator functions. Connect and disconnect the Wi-Fi networks automatically via phone tracking antennas. You just can automate everything including the bluetooth. You just need to figure out the commands. Use it greatly. Follow the link...