def ensure_libs(target, source, env):
- return target, [source, env.get('BUILD_DIR') + 'librcs_server.so',
+ return target, [source, env.get('BUILD_DIR') + 'librcs_server.so',
env.get('BUILD_DIR') + 'librcs_client.so',
env.get('BUILD_DIR') + 'librcs_container.so']
jdk_env = Environment(ENV=os.environ)
-jdk_env['BUILDERS']['Gradle'] = Builder(action = env.get('ANDROID_GRADLE') +
+jdk_env['BUILDERS']['Gradle'] = Builder(action = env.get('ANDROID_GRADLE') +
' build -bservice/resource-container/android/build.gradle -PTARGET_ARCH=%s -PRELEASE=%s --stacktrace' %(ANDROID_TARGET_ARCH, ANDROID_RELEASE),
emitter = ensure_libs)
jdk_env['BUILD_DIR'] = env.get('BUILD_DIR')
-jdk_env.Gradle(target="service/objs",
- source="service/src/main/java/org/iotivity/service/resourcecontainer/RcsBundleInfo.java")
+jdk_env.Gradle(target="service/objs",
+ source="resource-container/src/main/java/org/iotivity/service/resourcecontainer/RcsBundleInfo.java")
IOTIVITY_LIB_PATH := $(ROOT_PATH)/out/android/$(TARGET_ARCH_ABI)/$(APP_OPTIM)
include $(CLEAR_VARS)
-LOCAL_MODULE := rcs_common
-LOCAL_SRC_FILES := $(IOTIVITY_LIB_PATH)/librcs_common.so
-include $(PREBUILT_SHARED_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := rcs_client
-LOCAL_SRC_FILES := $(IOTIVITY_LIB_PATH)/librcs_client.so
-include $(PREBUILT_SHARED_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := rcs_server
-LOCAL_SRC_FILES := $(IOTIVITY_LIB_PATH)/librcs_server.so
-include $(PREBUILT_SHARED_LIBRARY)
-
-include $(CLEAR_VARS)
LOCAL_MODULE := rcs_container
LOCAL_SRC_FILES := $(IOTIVITY_LIB_PATH)/librcs_container.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
+LOCAL_LDLIBS := -L$(LOCAL_PATH)/$(IOTIVITY_LIB_PATH)/
+LOCAL_LDLIBS += -lrcs_common
+
OIC_SRC_DIR := ../../../../../..
LOCAL_MODULE := resource_container_jni
LOCAL_CPPFLAGS := -std=c++0x -frtti -fexceptions
-LOCAL_LDLIBS := -llog
+LOCAL_LDLIBS += -llog
-LOCAL_SHARED_LIBRARIES += rcs_common
-LOCAL_SHARED_LIBRARIES += rcs_client
-LOCAL_SHARED_LIBRARIES += rcs_server
LOCAL_SHARED_LIBRARIES += rcs_container
include $(BUILD_SHARED_LIBRARY)
* //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*/
-include ':service'
+include ':resource-container'
2. Copy aar files into app/libs folder
- {Iotivity_root}/android/android_api/base/build/outputs/aar/iotivity-{TARGET_ARCH}-base-{MODE}.aar
- - {Iotivity_root}/service/resource-container/android/service/build/outputs/aar/iotivity-{TARGET_ARCH}-service-{MODE}.aar
+ - {Iotivity_root}/service/resource-encapsulation/android/service/build/outputs/aar/iotivity-{TARGET_ARCH}-service-{MODE}.aar
+ - {Iotivity_root}/service/resource-container/android/resource-container/build/outputs/aar/iotivity-{TARGET_ARCH}-resource-container-{MODE}.aar
3. Configure dependencies for libs in app/build.gradle
- default TARGET_ARCH is armeabi
then, dependencies should be modified like below
dependencies {
- compile(name:'iotivity-x86-service-debug', ext:'aar')
compile(name:'iotivity-x86-base-debug', ext:'aar')
+ compile(name:'iotivity-x86-service-debug', ext:'aar')
+ compile(name:'iotivity-x86-resource-container-debug', ext:'aar')
}
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="iotivity-service-release-" level="project" />
+ <orderEntry type="library" exported="" name="iotivity-resource-container-release-" level="project" />
<orderEntry type="library" exported="" name="iotivity-base-release-" level="project" />
</component>
</module>
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
- compile(name:'iotivity-service-release', ext:'aar')
compile(name:'iotivity-base-release', ext:'aar')
+ compile(name:'iotivity-service-release', ext:'aar')
+ compile(name:'iotivity-resource-container-release', ext:'aar')
}
public void removeBMIBundle() {
List<RcsBundleInfo> bundleList = containerInstance.listBundles();
- if (0 == bundleList.size()) {
- logMessage = "No bundle to remove" + "\n";
+ if (1 == bundleList.size()) {
+ logMessage = "BMI Bundle not added" + "\n";
} else {