capacitor-native-settings icon indicating copy to clipboard operation
capacitor-native-settings copied to clipboard

How should the return value be interpreted?

Open despinac opened this issue 11 months ago • 2 comments

The open() function returns a Promise, which includes a boolean status. Could you elaborate on the scenarios, where the promise is

  1. resolved with a status true,
  2. resolved with status false,
  3. rejected

Thank you in advance!

despinac avatar Mar 19 '24 15:03 despinac

Looking to understand the meaning of returned status value as well. Would be great to get an answer.

Upon successful call to Native settings to open the dialog, it seems to immediately resolve with "true". Should the true value be interpreted as "the user was presented with a dialog to make a selection"? From trying to understand the source code (not very familiar with the plugin code structure) it seems to return with true/success upon opening the settings dialog.

Will be great to confirm.

Thank you.

stib avatar Apr 16 '24 03:04 stib

I don't think the functionality for the return value was ever finished. The plan was to give true or false based on the result of the activity (resultCode). A new version is in the works that handles the result of the activity to give true or false.

RaphaelWoude avatar Jun 27 '24 08:06 RaphaelWoude