diff options
author | Kolin Lu <kolinlu@google.com> | 2023-05-23 12:45:37 -0700 |
---|---|---|
committer | Kolin Lu <kolinlu@google.com> | 2023-05-23 12:45:37 -0700 |
commit | cc7a7d918f67ad4b2640b04aed84256c5fd316da (patch) | |
tree | fefd43ecbeaddf07640e0ddf317dc59cc41b68a6 | |
parent | 55f33ddc929cc6448306638b3b83f691aaa04781 (diff) | |
download | mobly-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.java | 21 |
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 |