update description related start/stop advertisement API. 83/16583/4
authorjihwan.seo <jihwan.seo@samsung.com>
Thu, 19 Jan 2017 10:22:19 +0000 (19:22 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Wed, 25 Jan 2017 04:16:08 +0000 (04:16 +0000)
Change-Id: I6ece93384e0204957b3dd406b0796c50544b5220
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16583
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
java/iotivity-android/src/main/java/org/iotivity/ca/CaInterface.java

index 9a05ca7..f8f0661 100644 (file)
@@ -220,6 +220,21 @@ public class CaInterface {
 
     /**
      *  start BLE Advertising.
+     *  precondition : since android gatt server in IoTivity doesn't start to advertise by default.
+     *                 (it can prevent battery consumption issue)
+     *                 ble adv flag should be set to enable flag, if you want to use this method.
+     *                 we provide BT configure setter API which has ble adv flag like below method
+     *                 'void setBTConfigure(...)'
+     *                 it should be set before call init ocstack like PlatformConfig setter.
+     *
+     *  1. gatt server stop advertisement after connect with someone by default.
+     *     thur, you should call this method, if you want to connect others continuously.
+     *
+     *  2. if you want to start advertisement in initialization step,
+     *     you can call just setBTConfigure API.
+     *     since advertisement will be triggered by the flag, when gatt server is started.
+     *     to conclude, you don't need to call startLeAdvertising API,
+     *     if adv enable flag is set in setBTConfigure API.
      */
     public synchronized static void startLeAdvertising(){
         CaInterface.startLeAdvertisingImpl();
@@ -228,6 +243,12 @@ public class CaInterface {
 
     /**
      *  stop BLE Advertising.
+     *  it can stop to advertise le for gatt server even though there is no connected endpoint.
+     *  it will help to reduce battery consumption,
+     *  when someone doesn't want to advertise by user scenario.
+     *
+     *  if you want to stop advertiment in initialize step.
+     *  you can call just setBTConfigure API with adv disable flag.
      */
     public synchronized static void stopLeAdvertising(){
         CaInterface.stopLeAdvertisingImpl();