Open Kaz-z opened 3 years ago
Well, I got the same issue when using setVolume(0, {type: 'ring'})
. Some news?
Its intermittent for me weirdly enough. After a clean / rebuild i dont see the error anymore. Im sure ill see it again so its best to fix this. I can contribute the change back.
Only thing is I dont know if the maintianers are active with PRs or releases.
I have the same issue sometimes when using setVolume(0, {...})
.
Hi,
I intermittently receive errors about 'calling start activity from outside of an activity context' when I call the setVolume method.
I believe its due to a new activity being called here https://github.com/c19354837/react-native-system-setting/blob/7fd99df1161bffcc5ddda876ea48918a5cac2c24/android/src/main/java/com/ninty/system/setting/SystemSetting.java#L306
One solution would be to add
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
above the line before starting the activity.What do you guys think?