项目作者: keinix

项目描述 :
BLE client / server example for Android
高级语言: Kotlin
项目地址: git://github.com/keinix/peer_to_peer_ble.git
创建时间: 2020-02-10T00:07:39Z
项目社区:https://github.com/keinix/peer_to_peer_ble

开源协议:Apache License 2.0

下载


PeerToPeerBle

This is an example project showing how to configure Android devices as both a BLE client (central) and BLE server (peripheral). This project is meant to accompany a talk I gave at DroidKaigi 2020.

Slides: https://drive.google.com/file/d/1gASMtgCIra0u35VPVcULZEblJzxlZ-aK/view?usp=sharing

Video: Coming soon

Use Case

This sample projects demonstrates a one-off BLE connection where two Android devices, both acting as a client and a server, come into contact with each other, exchange some data, then disconnect. However, with minor changes, the implementation shown here can be altered to fit any use case.

One-off data exchange

Screen Shot 2020-06-02 at 15 13 33

BLE class structure

Screen Shot 2020-06-02 at 15 29 03

License

  1. Licensed under the Apache License, Version 2.0 (the "License");
  2. you may not use this file except in compliance with the License.
  3. You may obtain a copy of the License at
  4. http://www.apache.org/licenses/LICENSE-2.0
  5. Unless required by applicable law or agreed to in writing, software
  6. distributed under the License is distributed on an "AS IS" BASIS,
  7. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  8. See the License for the specific language governing permissions and
  9. limitations under the License.