Sunday, May 04, 2008

Bluetooth Proximity Detection on OS X

Bluetooth Proximity Detection on OS X
"The tool I ultimately chose for the purpose of the detection itself is a little free app appropriately called Proximity. This is a thin little program that does one thing, but does it well -- that is to sit in the background and scan for a given Bluetooth device at regular intervals. When it detects a change in the device’s availability, it simply calls one of two Applescripts: One for the device leaving range, and another for when the device enters range.

So, armed with that I set out to create two Applescripts that would perform the following tasks:

When the Bluetooth Device enters range:

  1. Deactivate the Screen Saver Password.

  2. Deactivate the Screen Saver.

  3. Reconnect the phone to the OS X Address Book

  4. Sync the phone using iSync

When the Bluetooth Device leaves range:

  1. Activate the Screen Saver Password.

  2. Activate the Screen Saver."