-
Notifications
You must be signed in to change notification settings - Fork 160
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
addVolumeListener callback doesn't have the same behaviour on Android and iOS #102
Comments
* Fix SoundVolume addVolumeListener callback have the same behaviour on Android and iOS * Fix c19354837#102 * Fix c19354837/issues/102
Yes, you make the right thing. I add Your code looks like great, while I cannot verify it now in my phone for some reason. I'll merge it ASAP. |
I've test your codes just now, and it still calls the volume listener when Image that, We call
While we call
|
I have push my code to master, you can review it. Is that what you hope? |
It seems that the behaviour of the
addVolumeListener
callback is called differently from iOS and Android when the volume is set within the library.On Android, when you set the volume with
setVolume
, listeners are unregistered:then registered again, when the volume has been updated, so the
addVolumeListener
callback is not called.On iOS, there is not such things:
So
addVolumeListener
callback is called when you usesetVolume
.I tested to just remove the
unregisterVolumeReceiver();
andregisterVolumeReceiver();
on Android, and it works like iOS. And that's the behaviour I would like to have.But now I'm worried if there is something that I didn't see and can lead to memory leek, strange behaviour, hidden infinite loop, or performance issue?
It it's the case, it could be nice to update the iOS part and add this:
Anyway, let me know if I can help and do a PR in either way. Because I think the best thing is to have the same behaviour between platforms right?
The text was updated successfully, but these errors were encountered: