Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

No branches or pull requests

3 participants