.netMaui GA Android BluetoothLE: Stumbled at using RequestPermissions
See original GitHub issueHi, I have great hopes for this. So trying to follow the example at https://github.com/inthehand/32feet/wiki/Bluetooth-Low-Energy
So I nuget the InTheHand.BluetoothLE 4.0.24 I add the line
RequestPermissions(new string[] { Manifest.Permission.AccessCoarseLocation, Manifest.Permission.BluetoothAdmin }, 1);
I get the red wavy lines under RequestPermission and Manifest
I assume? that I need to use
using InTheHand.Bluetooth; (I expected BluetoothLE, but not in the intellisense, as I don't want to use Bluetooth classic?)
However the red wavy lines don’t disappear.
What stupid thing am I doing (or not doing) 😦)
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
.net Maui Bluetooth LE - Run-time permissions check and ...
I'm just starting now with BLE and MAUI app development then I've tested the app by using my phone as Android Emulator in...
Read more >Check and Request Permissions in .NET MAUI - YouTube
NET MAUI and how to extend it with custom permissions. ... cross-platform API, and then implement custom bluetooth permissions for Android !
Read more >Permissions - .NET MAUI
This class allows you to check and request permissions at run-time. The Permissions type is available in the Microsoft.Maui.ApplicationModel ...
Read more >.NET MAUI does not work with Android 13 ...
The app can't work without media picker (MediaPicker control), but it seems to rely on WRITE_EXTERNAL_STORAGE only, which is not in the list...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The following post https://gist.github.com/salarcode/da8ad2b993e67c602db88a62259d0456 shows how to add theBluetooth permissions. It seems to be working as for my app it now seems to have Bluetooth permission options. It doesn’t display a popup requesting access. I don’t yet know if that is something Android automatically does or it’s what needs to be written for Maui. For example requesting Location permission results in a very pretty popup.
Anyway it’s progress and maybe can be improved?
The source thread for this is https://github.com/dotnet/maui/discussions/277
I’ll add a link to that post to the Wiki. It’s a good sample because it covers all the different Android versions where different permission combinations are required. Ultimately it would be good to either include a maui permission in this library or submit it to the maui essentials library so that it is always available out of the box.