You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
I noticed that notifications under Android are not working correctly (under iOS are working correctly).
In the following code, I write a value inside a characteristic (c) that enable the notifications.
if (c.CanWrite)
{
c.Write(new byte[] { 0x01 });
AddLog("Notif enabled");
valueUpdatedHandler = (s, ea) =>
{
Device.BeginInvokeOnMainThread(() =>
{
AddLog("NOTIFICATION");
});
};
c.ValueUpdated += valueUpdatedHandler;
c.StartUpdates();
}
Once enabled the notifications, every time i write a value inside a second characteristic, I should receive a notification from the first (c).
Under iOS all is working with no problem but under Android i don't receive notification.
The strange thing is that on Android, with the notifications enabled, when I read a value from the first characteristic (c.ReadAsync();), the method return the correct value and I also receive a notification!
If you need other informations, I'll provide it
Thank you very much
Marco
The text was updated successfully, but these errors were encountered:
I wrote a Gatt call Queue and queued all of my calls on it. Issue on Android side it that you need to have one active Gatt call at a time. Older versions seem to like those calls on the GUI thread. As for now, the BLE changes I have are working fine. I tested this with two different BLE devices on Samsung Galaxy S4 and Nexus 7.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I noticed that notifications under Android are not working correctly (under iOS are working correctly).
In the following code, I write a value inside a characteristic (c) that enable the notifications.
if (c.CanWrite)
{
c.Write(new byte[] { 0x01 });
AddLog("Notif enabled");
valueUpdatedHandler = (s, ea) =>
{
Device.BeginInvokeOnMainThread(() =>
{
AddLog("NOTIFICATION");
});
};
c.ValueUpdated += valueUpdatedHandler;
c.StartUpdates();
}
Once enabled the notifications, every time i write a value inside a second characteristic, I should receive a notification from the first (c).
Under iOS all is working with no problem but under Android i don't receive notification.
The strange thing is that on Android, with the notifications enabled, when I read a value from the first characteristic (c.ReadAsync();), the method return the correct value and I also receive a notification!
If you need other informations, I'll provide it
Thank you very much
Marco
The text was updated successfully, but these errors were encountered: