1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 Copyright 2013 The Android Open Source Project
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9     http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16-->
17<sample>
18    <name>BluetoothAdvertisements</name>
19    <group>Connectivity</group>
20    <package>com.example.android.bluetoothadvertisements</package>
21
22    <minSdk>21</minSdk>
23
24
25    <strings>
26        <intro>
27<![CDATA[
28This samples demonstrates how to use the Bluetooth Low Power Advertisements API
29with a single device acting as both scanner and advertiser.
30]]>
31        </intro>
32    </strings>
33
34    <colors>
35        <color>
36            <name>colorPrimary</name>
37            <hexval>#434AB3</hexval>
38        </color>
39        <color>
40            <name>colorPrimaryDark</name>
41            <hexval>#34379D</hexval>
42        </color>
43        <color>
44            <name>textColorPrimary</name>
45            <hexval>#FFFFFF</hexval>
46        </color>
47    </colors>
48
49    <template src="base" />
50
51
52    <metadata>
53        <status>PUBLISHED</status>
54        <categories>Connectivity</categories>
55        <technologies>Android</technologies>
56        <languages>Java</languages>
57        <solutions>Mobile</solutions>
58        <level>ADVANCED</level>
59        <icon>screenshots/icon-web.png</icon>
60        <screenshots>
61            <img>screenshots/1-main.png</img>
62        </screenshots>
63        <api_refs>
64            <android>android.bluetooth.le.BluetoothLeAdvertiser</android>
65            <android>android.bluetooth.le.BluetoothLeScanner</android>
66        </api_refs>
67
68        <description>
69<![CDATA[
70Sample demonstrating how to advertise small amounts of data using the Bluetooth
71Low Energy API. Also demonstrates how to scan for those Advertisements. (requires
722 devices to see full operation)
73]]>
74        </description>
75
76        <intro>
77<![CDATA[
78This sample demonstrates use of the Bluetooth Low Energy (BLE) [Advertisement][1] and [Scanning][2] APIs.
79The functionality is split into two fragments - one for Advertising, one for Scanning.
80
81ScannerFragment activates BLE Scanning for 5 seconds and displays a list of found devices which are advertising
82using this sample. It shows the device type, Bluetooth address, and when it was last seen. User can
83refresh to scan again and update the list.
84
85AdvertiserFragment allows the user to toggle BLE Advertising of that device. It broadcasts basic
86information about the device along with a UUID specific to this app so the ScannerFragment on other
87devices can filter by it.
88
89Note: A device cannot detect its own BLE advertisements. You will need two devices to see this
90sample in action.
91
92[1]:https://developer.android.com/reference/android/bluetooth/le/BluetoothLeAdvertiser.html
93[2]:https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html
94]]>
95        </intro>
96    </metadata>
97</sample>
98