mit-cml/appinventor-sources — pull request #137 by themadrobot (2014-10-09 07:44:16+00:00)
Title: Native Library Fixed

Currently the code for include Native Libraries does not work. This pull request fixes the issue.

Here is an example how to added the native libriaries

1) Add you libraries to the appinventor\lib folder

Example:

appinventor\lib\sphero\RobotLibrary.jar
appinventor\lib\sphero\armeabi\libachievement_manager.so
appinventor\lib\sphero\armeabi-v7ai\libachievement_manager.so

2) In the file appinventor\buildserver\build.xml add the native library

Example:

3) In the component file appinventor\components\src\com\google\appinventor\components\runtime\mrSphero.java add the @UsesNativeLibraries annotations as shown below

Example:

@DesignerComponent(version = 1,
description = "Component to control Sphero",
category = ComponentCategory.USERINTERFACE,
nonVisible = true,
iconName = "images/soundRecorder.png")
@SimpleObject
@UsesPermissions(permissionNames = "android.permission.BLUETOOTH_ADMIN, android.permission.BLUETOOTH")
@UsesLibraries(libraries = "RobotLibrary.jar")
@UsesNativeLibraries(libraries = "libachievement_manager.so" ,
v7aLibraries = "libachievement_manager.so")
public class mrSphero extends AndroidNonvisibleComponent