react native - Expo - How do I open system settings on android platform -
const url = platform === 'ios' ? 'app-settings:' : 'some-android-system-setting-url' linking.canopenurl(url).then(supported => { if (!supported) { console.log('can\'t handle url: ' + url); } else { return linking.openurl(url); } }).catch(err => console.error('an error occurred', err));
i using expo develop project. called function above, working on ios, while, seems not support android. checked questions, people said need create native modules, expo said, supports pure js. can me that? thank you.
you can open with
startactivityforresult(new intent(android.provider.settings.action_settings), 0);
you can return pressing button on device.
Comments
Post a Comment