updated CA Android Sample APP
authorjihwan.seo <jihwan.seo@samsung.com>
Fri, 31 Jul 2015 05:13:18 +0000 (14:13 +0900)
committerErich Keane <erich.keane@intel.com>
Mon, 3 Aug 2015 17:23:50 +0000 (17:23 +0000)
- to add payloadSize in CAInfo_t type in CA Sample.
- to update address and port number automatically.

Change-Id: I0080d4572797539d1a74150edc7b3bd5dafba76e
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2016
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
resource/csdk/connectivity/samples/android/casample/sampleService/src/main/java/org/iotivity/ca/service/MainActivity.java
resource/csdk/connectivity/samples/android/casample/sampleService/src/main/jni/ResourceModel.c

index ec177c3..4582e9c 100755 (executable)
@@ -707,9 +707,10 @@ public class MainActivity extends Activity {
         } else if (subject.equals(getString(R.string.remote_port))) {
             StringBuilder sb = new StringBuilder();
             String uri = mReqData_ed.getText().toString();
+            sb.append(uri);
             if (null != receivedData && uri.contains("."))
             {
-                sb.append(uri).append(":").append(receivedData);
+                sb.append(":").append(receivedData);
             }
             sb.append(getString(R.string.uri));
             mReqData_ed.setText(sb.toString());
index 9f89c26..f86f345 100644 (file)
@@ -646,6 +646,7 @@ Java_org_iotivity_ca_service_RMInterface_RMSendNotification(JNIEnv *env, jobject
             return;
         }
         snprintf(responseData.payload, length, SECURE_INFO_DATA, resourceURI, g_localSecurePort);
+        responseData.payloadSize = length;
     }
     else
     {
@@ -663,6 +664,7 @@ Java_org_iotivity_ca_service_RMInterface_RMSendNotification(JNIEnv *env, jobject
             return;
         }
         snprintf(responseData.payload, length, NORMAL_INFO_DATA, resourceURI);
+        responseData.payloadSize = length;
     }
 
     responseData.type = messageType;