add activityResult to improve promise usability on Android
Closed this issue · 2 comments
setoba1192 commented
Adds usability to then promise in the method NativeSettings.open to trigger some method when user gets back to screen
Platform:
Android
Current Behavior: Then promise execute immediately when call open method
New Behavior: Then promise wait to user gets back to screen
openSettingsTurnOnLocation = () => {
const options = {
optionAndroid: AndroidSettings.ApplicationDetails,
optionIOS: IOSSettings.App,
};
NativeSettings.open(options).then((data) => {
this.presentAlert('then execution', JSON.stringify(data), '');
});
};
I created a pull request to add this enhancement #31
RaphaelWoude commented
Hi. I think this would be a great addition to the plugin. I just commented on your PR.
RaphaelWoude commented
Live in v5.0.0