1.9 KiB
1.9 KiB
Companion Device Manager Sample
This sample showcases the use of the Companion Device Manager (CDM) to find and associate devices.
How to use the sample:
- Use two devices running the sample
- In one device start the GATTServerSample
- In the other open the CompanionDeviceManagerSample)
- Click start button in the CDM sample
It should directly find the server and a system request will appear. Once accepted both devices will be associated. You can then connect (see ConnectGATTSample and receive (see CompanionDeviceSampleService) appear and disappear events (if running A12+).
Note: You can associate multiple devices. When the server closes and opens again a new mac address will be used, thus you need to associate them again.
License
Copyright 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.