Giter Site home page Giter Site logo

triaxis.bluetoothle's People

Contributors

ssimek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

triaxis.bluetoothle's Issues

IServiceCollection' does not contain a definition for 'AddBluetoothLE'

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.

Sample?

A sample MAUI project on how to use this would be great:)

Unable to load assembly

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?

image
image

No Scan Result in Example App (DeviceBrowser)

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)

Exception unhandled

triaxis.BluetoothLE.BluetoothLEException: 'Connection lost: Success'

Any suggestion on how can I handle this? It happens when BLE device is turned off when connected.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.