Site Tools


resource_container

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
resource_container [2016/03/25 05:23]
mjun85 [Working Flow]
resource_container [2016/03/25 05:55]
mjun85
Line 264: Line 264:
 **AndroidBundle** is a sample bundle for android with several bundle resources **AndroidBundle** is a sample bundle for android with several bundle resources
  
 +==== Build and import procedure ====
  
 +  * Import RCSampleClientApp,​ RCSampleServerApp and AndroidBundle applications from the given path : “{Iotivity_root} /​service/​resource-container/​examples/​android” to Android studio. ​
 +  * To import projects in Android Studio, Go to File -> Open.
 +  * Create ‘libs’ folder in app folder each of RCSampleClientApp and RCSampleServerApp projects (if not present) and copy the required libraries.
 +  * iotivity-base-{TARGET_ARCH}-{MODE}.aar located in {Iotivity_root} /​android/​android_api/​base/​build/​outputs/​aar
 +  * iotivity-{TARGET_ARCH}-service-{MODE}.aar located in {Iotivity_root} /​service/​resource-encapsulation/​android/​service/​build/​outputs/​aar
 +  * copy the below libs to ‘libs’ folder in app folder of RCSampleServerApp and AndroidBundle
 +  * iotivity-{TARGET_ARCH}-resource-container-{MODE}.aar located in {Iotivity_root} /​service/​resource-container/​android/​resource-container /​build/​outputs/​aar
 +  * iotivity-{TARGET_ARCH}-resource-container-{MODE}.aar located in {Iotivity_root} /​service/​resource-container/​android/​resource-container /​build/​outputs/​aar
 +  * libBMISensorBundle.so
 +  * libDISensorBundle.so
 +  * From : {Iotivity_root}/​out/​android/​{TARGET_ARCH}/​{MODE}/​ where TARGET_ARCH is a build option for scons of iotivity and where MODE is release or debug.
 +  * Clean and build example projects and launch the applications.
 +
 +**Android Bundle**
 +  * Execute the gradle jar task
 +  * Run the dx tool (Android platform tool) on the .jar in order to transform the classes for the Dalvik VM: dx --dex bundle.jar
 +  * Copy the resulting .jar file into the libs folder of the RCSampleServerApp
 +
 +==== Running applications ====
 +  * First Run the RCSampleServerApp,​ and press START CONTAINER.
 +  * LIST BUNDLES will show the list of the bundles that the Container started with.
 +  * Note : In sample application we have the configuration file (.xml) with one bundle. It will create a resource of type oic.sensor. To discover the resource press “DISCOVER ESOURCE” button on RCSampleClientApp. The following logs will be shown on the Client app.\
 +  * User can press the option 1 and 2 of each bundle in the list to “Add and Start bundle”. Registered bundle resources will be listed with option 3.
 +  * Press option 4 “Stop Bundle” to stop the Bundle. If user stops the bundle all the resources that are added to bundle will be removed. Press option 5 “Remove Bundle” to remove the bundle.
resource_container.txt · Last modified: 2016/03/25 05:55 by mjun85