Hardware Reference
In-Depth Information
Finally, go to the Settings menu, select Storage→Options→“USB computer connection,”
and enable the Camera option (as shown in Figure 8-3 )to allow you to transfer files.
Figure 8-3. Configuring the Android as a camera to transfer files
This might sound counter-intuitive, but the device needs to be in Camera mode for the
development tools to work.
Start a New Project
To start a new application, you'll first need to import the Bluetooth Application Accel‐
erator's Android files into the project. Open Eclipse ADT, select File/Import, navigate
to the directory that contains the Application Accelerator, and select the Android/
BLEDemo folder. Press OK to import the project into the workspace.
At this point, you might want to look through the Application Accelerator files a bit to
see how the code is laid out. If it looks foreign to you, don't worry. Rather than spending
too much time inside the Application Accelerator, you're going to move the main class
files for the BLE library into your own project.
Now it's time to create your own Android project. In Eclipse, go to File→New→Android
Application Project. For the Application Name, use BleSensorTag . For Minimum Re‐
quired SDK, specify Android 4.3. This is the minimum version of Android that supports
Bluetooth Low Energy. For Target SDK and Compile With, use the latest version of
Android the device supports. Click Next for the rest of the windows to accept the de‐
faults. Finally, the project wizard should create a new Android project for you called
BleSensorTag.
 
Search WWH ::




Custom Search