Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Notifications issue on Android #30

Open
marcojak opened this issue Apr 10, 2015 · 1 comment
Open

Notifications issue on Android #30

marcojak opened this issue Apr 10, 2015 · 1 comment

Comments

@marcojak
Copy link

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

@KeyvanPouyan
Copy link

I encountered notify issues as well on Android.

#33

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 free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants