This library is a part of the OpenXC project.
This Android library contains the tools required to read vehicle data from the vehicle's CAN bus through the OpenXC vehicle interface in any Android application.
After cloning the
openxc-android repository to your local disk, open Eclipse
and go to
File -> New -> Other -> Android -> Android Project from Existing
Source. Browse to the
openxc-android folder and it should detect the 4
Android projects within the repository. At the minimum, add the
(the Android library itself) and
OpenXcEnablerActivity (the Enabler app,
required to run OpenXC applications).
You also need the Android support library, but unfortunately Google doesn't
deploy the latest versions of this to the the Central Maven repository. Instead,
you must open the Android SDK manager and install the "Android Support
Repository" package (under "Extras"). Next, open a terminal and navigate to your
SDK's top-level directory (e.g.
You must manually copy the Maven artifacts from this folder to your local repository:
$ cp -R $ANDROID_HOME/extras/android/m2repository/com ~/.m2/repository
After satisfying those requirements, the build is pretty simple:
To compile the OpenXC library as an APKLIB and install it to your local Maven repository:
$ mvn install -pl openxc -am
To compile and build and APK for the Enabler app (that uses the OpenXC library):
$ mvn package -pl enabler
Finally, to deploy the packaged APK to an attached Android device and run it:
$ mvn android:deploy android:run -pl enabler
mvn clean install -pl openxc,openxc-it -amfrom the root directory to build and run the library and test suite. This requires that an Android device is attached or an emulator is running.
If you want the tests to wait for a debugger to attach, change the
Please see our Contribution Documents.
Copyright (c) 2011-2013 Ford Motor Company Licensed under the BSD license.