C# 移动开发(Xamarin.Form) Plugin.BLE 蓝牙连接
生活随笔
收集整理的這篇文章主要介紹了
C# 移动开发(Xamarin.Form) Plugin.BLE 蓝牙连接
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?
隨著Xamarin.Form項目接近尾聲,仔細一算才發現過來大半年時間了。
期間除了剛開始有閑情寫寫,現在總算有空來總結一下了。
來先說 Plugin.BLE (https://github.com/xabre/xamarin-bluetooth-le),在NuGet里搜索 Bluetooth ,Plugin.BLE是下載最多的Xamarin.Form可用的庫,有16.3K(1.63萬)人下載(2017-11-23)。
幾乎可用庫都試過
-
調用
?Plugin.BLE用法有兩種,一種直接調用,代碼來自Plugin.BLE的開源項目
var ble = CrossBluetoothLE.Current;
?//另一種是注入MvvmCross服務
var ble = Mvx.Resolve<IBluetoothLE>();var adapter = Mvx.Resolve<IAdapter>();
//或者 MyViewModel(IBluetoothLE ble, IAdapter adapter)
{ this.ble = ble;this.adapter = adapter;
}
-
?
?
?
?
?//以前的草稿,項目完成了,先發布,不再更新。
?
?
轉載于:https://www.cnblogs.com/zlyxm/p/7886040.html
總結
以上是生活随笔為你收集整理的C# 移动开发(Xamarin.Form) Plugin.BLE 蓝牙连接的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Python之旅:列表
- 下一篇: c# char unsigned_dll