aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKolin Lu <kolinlu@google.com>2023-05-23 12:45:37 -0700
committerKolin Lu <kolinlu@google.com>2023-05-23 12:45:37 -0700
commitcc7a7d918f67ad4b2640b04aed84256c5fd316da (patch)
treefefd43ecbeaddf07640e0ddf317dc59cc41b68a6
parent55f33ddc929cc6448306638b3b83f691aaa04781 (diff)
downloadmobly-bundled-snippets-cc7a7d918f67ad4b2640b04aed84256c5fd316da.tar.gz
Correct `scanResponse` docstring and add an example
-rw-r--r--src/main/java/com/google/android/mobly/snippet/bundled/BluetoothLeAdvertiserSnippet.java21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/main/java/com/google/android/mobly/snippet/bundled/BluetoothLeAdvertiserSnippet.java b/src/main/java/com/google/android/mobly/snippet/bundled/BluetoothLeAdvertiserSnippet.java
index 12537a5..4b2c5b5 100644
--- a/src/main/java/com/google/android/mobly/snippet/bundled/BluetoothLeAdvertiserSnippet.java
+++ b/src/main/java/com/google/android/mobly/snippet/bundled/BluetoothLeAdvertiserSnippet.java
@@ -96,9 +96,24 @@ public class BluetoothLeAdvertiserSnippet implements Snippet {
* }
* </pre>
*
- * @param scanResponse A JSONObject representing a {@link AdvertiseData} object which saved the
- * advertisement data when a scanning device sends an active scan request. The data
- * structure will be the same as advertiseData.
+ * @param scanResponse A JSONObject representing a {@link AdvertiseData} object which will
+ * response the data to the scanning device. E.g.
+ * <pre>
+ * {
+ * "IncludeDeviceName": (bool),
+ * # JSON list, each element representing a set of service data, which is composed of
+ * # a UUID, and an optional string.
+ * "ServiceData": [
+ * {
+ * "UUID": (A string representation of {@link ParcelUuid}),
+ * "Data": (Optional, The string representation of what you want to
+ * advertise, base64 encoded)
+ * # If you want to add a UUID without data, simply omit the "Data"
+ * # field.
+ * }
+ * ]
+ * }
+ * </pre>
*
* @throws BluetoothLeAdvertiserSnippetException
* @throws JSONException