beacon_scanner | BLE beacon scanner for Mac/Raspberry PI
kandi X-RAY | beacon_scanner Summary
kandi X-RAY | beacon_scanner Summary
BLE beacon scanner for Mac/Raspberry PI
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of beacon_scanner
beacon_scanner Key Features
beacon_scanner Examples and Code Snippets
Community Discussions
Trending Discussions on beacon_scanner
QUESTION
I tried create my custom plugin for Flutter on Kotlin. I accessed the methodChannel and was able to do it, but when I want to use the bluetooth service in the methodChannel i am faicng this error. I did on Kotlin and my code ran correctly. The difference is My kotlin app's class is of type AppCompatActivity() and has onCreate() function. My problem was not solved when I added the onCreate function to my scanner.kt file. I get this error.
...ANSWER
Answered 2022-Mar-10 at 18:38Your BeaconScannerPlugin
is an Activity and as the error stacktrace says, it needs to be in the created state before you can use it in getSystemService(Context.BLUETOOTH_SERVICE)
.
You should change your BeaconScannerPlugin
implementation to not depend on FlutterActivity
and instead use ActivityAware
interface.
ActivityAware
will give you an instace of activity that you can use to get the bluetooth service for your plugin.
You can read more on the official flutter webiste
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install beacon_scanner
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page