This video explains a simple BLE Explorer written in Xamarin (using plugin.BLE). In essence the app is a simple version of the nRF app: It allows the user to select a BLE device, then shows all available services. Upon selection of a service it will show the available Characteristics. One can then read/write strings or register to Characteristics with "notify" enabled.
Code is available here:
github.com/mo-thunderz/Xamari...
Code was originally based on Jenx Bluetooth example, but then updated and changed to be compatible with modern Android phones (release 12 and higher): www.jenx.si/2020/08/13/blueto...
Code is written for Android Release 12 or newer. All logic is placed in Code Behind in this example.
Plugin.BLE repository (with information on adaption for Iphones):
github.com/dotnet-bluetooth-l...
Chapters
0:00 Introduction
3:14 Installation of programming environment
6:19 Enable USB Debugging on your phone
8:00 Download code from Github
8:44 Enabling Bluetooth on Android 12 or newer
11:11 App description: App.xaml
11:42 App description: Bluetooth Devices Page
18:45 App description: Bluetooth Services Page
25:38 App description: Bluetooth Characteristics Page
31:22 Notify callback function
36:50 Send and Receive functions
25 июл 2024