-
Notifications
You must be signed in to change notification settings - Fork 159
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
IOS Volume is always 0 #112
Comments
Okay I found out that it doesn't work on Simulator - only on Physical device - please add it to the docummentation. |
hello dev, first of all, thank you for your hard work. @Karniej Unfortunatelly I also have this issue: All of these return const volumeMusic = await this.getSystemSettingsVolume('music');
const volumeSystem = await this.getSystemSettingsVolume('system');
const volumeCall = await this.getSystemSettingsVolume('call');
const volumeAlarm = await this.getSystemSettingsVolume('alarm');
const volumeNotification = await this.getSystemSettingsVolume('notification');
const volumeRing = await this.getSystemSettingsVolume('ring'); but when using listener, type TSystemSettingsVolumeListenerData = {
alarm: number,
call: number,
music: number,
notification: number,
ring: number,
system: number,
value: number,
};
SystemSetting.addVolumeListener((data: TSystemSettingsVolumeListenerData) => {
// IOS does not return anything but data.value
// Android lists TSystemSettingsVolumeListenerData
const volume = isIos ? data.value : data.music; // workaround
this._setAppVolumeLevel(volume);
}); |
@LeDanielH I recommend trying out on a physical device -then you can test it out correctly. :) |
@LeDanielH this library only works with physical devices. A simulator always returns 0 for volume and a device returns the correct volume level. |
I have a similar problem and to me it seems like the entire library isn't working for me. I tested it on a device and installed the library normally with npm i My Code is as followed
` No matter how much I change the volume on my device, it always stays 0? |
Hello there,
I'm working on an app and cannot get the package to work
RN version is 62.2
I added and linked the library correctly, but whenever I call the function
SystemSettings.getVolume('system').then(data => console.log(data)
I get the same amount all the time, even when I changed the volume on the simulator.Anyone had the same issue ?
The text was updated successfully, but these errors were encountered: