-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Android: showNativeVolumeUI stops working after app goes in the background and comes back #29
Comments
Another thing I noticed is that after setting E.g: useEffect(() => {
VolumeManager.showNativeVolumeUI({ enabled: true });
setTimeout(() => {
// doesn't work :(
VolumeManager.showNativeVolumeUI({ enabled: false });
}, 10000);
}, []); but setting it to Any ideas? Thanks! |
I'm getting the same issue on iOS. Once I call: Calling this doesn't work as you would expect: Basically once you hide the native volume UI you can't bring it back. |
There might be a logic issue here I have to check this once I have a bit more time. if (!flag && [strongSelf->customVolumeView superview]) {
[strongSelf->customVolumeView removeFromSuperview];
} else if (flag && ![strongSelf->customVolumeView superview]) {
// Potentially adjust the frame as needed, not necessarily CGRectZero
strongSelf->customVolumeView.frame = CGRectMake(0, 0, 0, 0);
UIViewController *topViewController = [strongSelf topMostViewController];
[topViewController.view addSubview:strongSelf->customVolumeView];
} might do the trick but I am not 100% sure yet. |
The below code change fixed the issue for me on iOS. On reflection, this is likely a different issue to what matiastucci experienced.
|
@Kieraano yes, @matiastucci issue is related to Android. I have some ideas. I will also verify your suggestion and create some more test cases and release a new version pretty soon |
Related issue(iOS)
Step to produce
|
I don't think its possible to hide the volume toast when the app is backgrounded. |
Ok, Thanks for quick reply! |
I'm hiding the native UI on a section of my app but I found that if I lock the screen and then turn it on again, the native UI starts appearing. I tried hiding it when the app state is active but no luck. FYI, this is only happening on Android. Any ideas?
The text was updated successfully, but these errors were encountered: