dotnet / android

.NET for Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
MIT License
1.93k stars 531 forks source link

BLE stack split notification event not working in Samsung android v14, Our app supported android 13 SDK #8688

Closed sujeetulli closed 9 months ago

sujeetulli commented 9 months ago

Android application type

Classic Xamarin.Android (MonoAndroid13.0, etc.)

Affected platform version

Android 13 SDK.

Description

I'm experimenting with Bluetooth LE with GATT and I have encountered a problem I need your help with.

The Server responds to the request with a Notification. Notifications can only be MTU 513 Bytes long, so I sometimes have to split the response into several Chunks and send it as separate notifications.

My problem is that when I split the response into 2 Chunks or more, they are never received by the Android 14 device. In Android 13 SDK If I have 2 chunks everything works as expected. I don't understand why this not working for Android 14?

Steps to Reproduce

Using an Android 14 device. The MTU size must be more than 514, Now build your project with Android SDK 13. Run the app in Android 14 devices, Now while communicating to the BLE The Split chunk notification will not work perfectly.

Did you find any workaround?

Not at

Relevant log output

No response

grendello commented 9 months ago

Hi @sujeetulli, I don't think this is an issue with our bindings or runtime. I think you'd be better off asking on Android forums/chats/issues. Xamarin.Android is a binding to Android, it invokes the actual Android APIs behind the scenes, we don't (re)implement any of this functionality.