This Quick Start guide shows you how to install and run the sample application, as well as setup your development environment in order to build the provided sample applications.
The SDK can be downloaded by going to Intel® CCF Developer Home Page. Intel® CCF SDK for Android contains:
- Intel CCF SDK
- Docs - All relavent SDK documentation and API Reference
- Lib - .so files
- Samples - Source for sample applications and in-proc library
- bin - Compiled binaries of sample applications
- Licenses and Notices
- Release Notes (ReleaseNotes.pdf)
Running the Samples
Intel® CCF SDK includes several sample applications along with source code to show how to use the SDK and CCF APIs. Simple Chat sample is the most basic sample application that covers all the major functionalities of CCF.
- The best way to interact with the SDK is through sample applications. In this release, Intel provides the SimpleChat sample application along with the source code. Compiled version of the sample can be found in the bin directory.
- Copy the SimpleChat.apk to your Android device’s memory card.
- Download and install a file explorer or any file system browser application on your Android device.
- Navigate to the memory card location where the .apk is copied and click SimpleChat.apk.
Note: You may need to enable installation of unsigned applications on your device. This can be done by going into Settings -> Applications -> check Unknown Sources. Location of this setting may not be same for all devices.
Building the Samples
Pre-requisites
Android is a platform independent and will work on all operating systems.
Eclipse is the most popular IDE for developing a Android application. All Intel® CCF SDK Samples are written and tested to build with Eclipse ADT v21.1.0
Requirements to Develop an Android CCF Application
Intel® CCF application development requires a properly configured Android development environment. Android devices running Intel CCF applications must be running Android version 4.0 or later.
To set up a suitable Android development environment, perform the following steps:
- Install JDK6 or later from Oracle (Java SE 6 Update 30 at the time of writing this document).
- Download and install the latest Android SDK and follow the instructions for installing the SDK and developer tools
Note: While downloading the SDK download the 32-bit or-64 bit SDK to match the development environment (not the target device)
Development Environment
Eclipse IDE is used to develop and build the sample applications.
CCF Project Setup
Import Inproc_lib project:
The Intel CCF in-Proc Library is intended to simplify integrating an application with Intel CCF. The first step in developing an Intel CCF application is to import the in-proc library to the project. In Eclipse:
- File –>Import –>Android –>Existing Android Code Into Workspace –>Browse to and select the Samples/inproc_lib project
- Click Finish
- The in-proc project will be added to your workspace
- Open Properties of inproc_lib visible as starterActivity.
- Go to Android and verify the "Project Build Target" is API Level 15 or greater. Also, make sure the checkbox "Is Library" is checked.
- Go to Java Build Path and remove stclib.jar from Libraries, if any. Click "Add External JARs", browse and select the location of stclibcc.jar (ex. Android_SDK\Lib\stclibcc.jar).
- Include external jar "android-support-v4.jar" (ex. C: Files (x86)-sdk\extras\android\support\v4\android-support-v4.jar) If this JAR is missing, open the Android SDK Manager and download it under Extras -> Android Support Library
- Go to the "Order and Export" tab. Add a check on stclibcc.jar and android-support-v4.jar. Click 'OK'.
Import Sample project:
- File –>Import –>Android –>Existing Android Code Into Workspace –>Browse to and select the Samples/SimpleChat project.
- Click 'Finish'.
- The SimpleChat project will be added to your workspace.
- Right click and open properties of SimpleChat. Go to Android and add a reference to inproc_lib(It may be visible as starterActivity).
- Make sure external jars exist in the Java build path and if not available manually include "Stclibcc.jar" and "android-support-v4.jar"
Build Samples
To build the sample applications, right click on the sample project and select "Build project" option. Refer to the screenshot below to see an example on how to build SimpleChat sample.
Once the sample application is successfully build, .apk file will be created in bin directory.
Run Samples
While installing SimpleChat.apk, use one of the below option:
Option 1 (Through adb interface) adb install -r SimpleChat.apk
Option 2 (Through SD card) Save the apk file in SD card and use File Manager application to install.
Option 3 (Through Eclipse) Right click project –> Run as Android application –> Select Device, Refer to the screenshot below.