triaxis-oss / triaxis.bluetoothle Goto Github PK
View Code? Open in Web Editor NEWSimple cross-platform BluetoothLE library for Xamarin.Forms
License: MIT License
Simple cross-platform BluetoothLE library for Xamarin.Forms
License: MIT License
Hi,
Is there a way you can add an application to solution so that I know which API's to call?
Trying to build the DeviceBrowser example app. Running into this error:
Error CS1061 'IServiceCollection' does not contain a definition for 'AddBluetoothLE' and no accessible extension method 'AddBluetoothLE' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?) DeviceBrowser (net6.0-windows10.0.19041.0)
I tried both adding the Nuget package or including a Project Reference to the 'triaxis.BluetoothLE.Maui' project. Both methods gave me this error.
Using VS2022 17.5.1
Any help would be appreciated.
A sample MAUI project on how to use this would be great:)
I'm trying to get this to work under Maui (Preview 14). The assembly throws an exception while trying to create an instance.
System.NotSupportedException: 'Cannot create instance of type 'triaxis.Maui.BluetoothLE.Android.StateBroadcastReceiver': no Java peer type found.'
Has anyone gotten this module to work in .NET MAUI Preview 14?
Tested the example app on Android but there is no result for the scan.
Output shows:
[DOTNET] Instantiating BluetoothScanner
[BluetoothAdapter] BluetoothAdapter() : com.companyname.devicebrowser
[BluetoothAdapter] STATE_ON
Thread started: .NET Timers #5
[BluetoothAdapter] STATE_ON
[BluetoothAdapter] STATE_ON
[BluetoothAdapter] STATE_ON
[BluetoothLeScanner] Start Scan with callback
[ViewRootImpl@f6680aa[MainActivity]] setView = com.android.internal.policy.DecorView@e1f07a5 TM=true
[ViewRootImpl@f6680aa[MainActivity]] Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=26 res=0x7 s={true -5476376617467146240} ch=true fn=-1
[hw-ProcessState] Binder ioctl to enable oneway spam detection failed: Invalid argument
[OpenGLRenderer] eglCreateWindowSurface
[ViewRootImpl@f6680aa[MainActivity]] [DP] dp(1) 1 android.view.ViewRootImpl.reportNextDraw:11374 android.view.ViewRootImpl.performTraversals:4167 android.view.ViewRootImpl.doTraversal:2893
[BufferQueueProducer] [ViewRootImpl@f6680aa[MainActivity]#0(BLAST Consumer)0](id:261200000000,api:1,p:9746,c:9746) queueBuffer: queued for the first time.
[ViewRootImpl@f6680aa[MainActivity]] [DP] pdf(0) 1 android.view.ViewRootImpl.lambda$addFrameCompleteCallbackIfNeeded$3$ViewRootImpl:4969 android.view.ViewRootImpl$$ExternalSyntheticLambda16.run:6 android.os.Handler.handleCallback:938
[ViewRootImpl@f6680aa[MainActivity]] [DP] rdf()
[ViewRootImpl@f6680aa[MainActivity]] reportDrawFinished (fn: -1)
[ViewRootImpl@f6680aa[MainActivity]] MSG_WINDOW_FOCUS_CHANGED 1 1
[InputMethodManager] startInputInner - Id : 0
[InputMethodManager] startInputInner - mService.startInputOrWindowGainedFocus
[InputMethodManager] startInputInner - Id : 0
Thread started: <Thread Pool> #6
Thread started: .NET ThreadPool Gate #7
Thread started: <Thread Pool> #8
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.Intrinsics.dll
Loaded assembly: /data/data/com.companyname.devicebrowser/files/.__override__/System.Runtime.Intrinsics.dll [External]
[e.devicebrowse] Explicit concurrent copying GC freed 31514(1018KB) AllocSpace objects, 0(0B) LOS objects, 60% free, 3929KB/10073KB, paused 42us,23us total 12.950ms
Thread started: <Thread Pool> #9
Thread started: <Thread Pool> #10
Thread started: <Thread Pool> #11
Thread started: <Thread Pool> #12
Thread started: <Thread Pool> #13
Thread started: <Thread Pool> #14
[BluetoothAdapter] STATE_ON
[BluetoothLeScanner] could not find callback wrapper
[BluetoothAdapter] STATE_ON
[BluetoothLeScanner] could not find callback wrapper
[BluetoothAdapter] STATE_ON
[BluetoothAdapter] STATE_ON
[BluetoothAdapter] STATE_ON
[BluetoothLeScanner] Start Scan with callback
[BluetoothAdapter] STATE_ON
[BluetoothLeScanner] could not find callback wrapper
Location permission is given to the app when running.
Device is Samsung SM-A715F (Android 12 - API 31)
Just chiming in to voice my support for Maui.... Where can documentation be found?
triaxis.BluetoothLE.BluetoothLEException: 'Connection lost: Success'
Any suggestion on how can I handle this? It happens when BLE device is turned off when connected.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.