Become aware of nearby friends without continuous tracking
The simplest way to install NearbyFriend on an Android device (or in the Android emulator) is to download the file using the link provided on the Download page and to install the application by clicking on the downloaded file. Make sure to allow installation from unknown sources in the application settings of the device.
You also need to deploy a proxy server (available from the installation page) on a standalone machine that the two Android devices can communicate with. The proxy server relays communication between the two devices. Simply run "java -jar ProxyServer.jar <port>" on the machine, where <port> is a port that your Android devices can connect to.
To start the NearbyFriend application on your device, click on its icon. Then, either click on the GPS button or manually enter x and y coordinates (e.g., 5 and 6). Now, enter the hostname and port of the proxy server. Your device will remember your inputs so that you don't have to enter them each time you start the application. Finally, click on the Go! button to invoke the protocol. Repeat the same steps on a second Android device (or in the Android emulator). If everything works as expected, the two devices will now periodically check whether they are nearby.
The installation page also provides the sources files so that you can build the application yourself.
The simplest way to install NearbyFriend on your BlackBerry is to transfer the provided binary to your device. You can do this with the BlackBerry Desktop Manager or with JavaLoader (javaloader -u load NearbyFriend.jad), which comes with the BlackBerry Java Development Environment (see below). Similarly, you need to transfer ca_uwaterloo_cs_tcl_comm_sms.jad, which is Earl Oliver's SMS-based data channel. The application can use either WiFi or SMS for data transmission.
To build the binary yourself, you need the BlackBerry Java Development Environment, which you can download for free. (It should also work with the Eclipse plugin.) Simply add the NearbyFriend project (NearbyFriend.jdp) to your workspace and build the application. By default, the cryptography routines in NearbyFriend take advantage of the Certicom Cryptography Classes, a closed-source, native cryptography framework for the Blackberry. You can use BouncyCastle, an open-source, Java-based cryptography framework instead if, for example, you don't have a signing key from RIM, which is required for the Certicom Cryptography Classes. Note that BouncyCastle is relatively slow on the BlackBerry. To enable BouncyCastle, look for "CGS97CerticomFactory" in NearbyFriend.java and replace it with "CGS97BCFactory". Make sure not to include the CGS97Certicom*.java files in your build when using BouncyCastle.
For Wi-Fi based data transmission, you also need to deploy a proxy server on a standalone machine that the two BlackBerry devices can communicate with. The proxy server relays communication between the two devices. Simply run "java -jar ProxyServer.jar x y" on the machine, where x and y are two non-firewalled ports. You can build the proxy server yourself by compiling ProxyServer.java.
To start the NearbyFriend application, click on the corresponding icon on your BlackBerry. You can use either WiF or SMS for data transmission. We recommend that you use SMS only if you have a plan with free incoming and outgoing SMS messages. For WiFi, enter the name and the two ports of the proxy server. Your device will remember your inputs so that you don't have to enter them each time you start the application. For SMS, enter the phone number of the other device. Now, either click on the GPS button or manually enter x and y coordinates (e.g., 100 and 100) and invoke the protocol. If you use BouncyCastle, you need to be a little bit patient. Of course, you need to repeat the steps on a second device.
The software distribution includes the source code of the NearbyFriend Pidgin plugin and binaries compiled under Ubuntu 8.10 and Windows XP. The binaries have also been tested to work under openSUSE 11.0. The distribution also includes the Skyhook libraries for Linux and for Windows XP. For other platforms, you might have to compile the plugin yourself. Please let us know if you manage to run the plugin on other platforms. You can download the Skyhook library for other platforms at http://www.skyhookwireless.com/developers/sdk.php.
Under Linux, the install.sh script included in the distribution will install the provided binary and the Skyhook library. You might have to modify the installation directories in the script according to your configuration. When compiling the plugin yourself under Linux, you can still use the script for installing the Skyhook library. Make sure to copy 'wpsapi.h.linux' to /usr/include and to rename it to 'wpsapi.h' before compiling.
Under Windows, copy nearbyfriend.dll to the plugins directory of your Pidgin installation. Typically, this is C:\Program Files\Pidgin\plugins. Then, copy the Skyhook library, wpsapi.dll, to C:\WINDOWS\system. The windows_build.txt file contains instructions for building nearbyfriend.dll yourself.
Once you have installed the plugin, enable it under Tools -> Plugins. You also need to enable the Off-the-Record (OTR) messaging plugin. If the plugin loads successfully, there will be a new menu entry 'NearbyFriend' in the Tools menu, which lets you learn your current latitude and longitude. (The x and y values will be used by the NearbyFriend application, see the paper cited above for details.) It might take a while till your device has this information. The configuration dialog box of the plugin (Tools -> Plugins, select NearbyFriend, click on Configure Plugin) lets you configure some of the plugin's parameters and choose the friends with whom you want to run NearbyFriend.
When you open a new conversation, there should be a message confirming that you are running the NearbyFriend application. If you don't see the confirmation message, close and re-open the conversation. Also, make sure that your conversation is protected by OTR.
By default, the plugin verifies every five minutes whether your friend is nearby. Also, the plugin will tell you whenever your friend verifies whether you are nearby.