Skip to content
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

feat(add-open-settings-uri-context) #152

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

FrederickEngelhardt
Copy link

@FrederickEngelhardt FrederickEngelhardt commented Mar 27, 2023

  • support passing uri into the openSettings so menus such as file manager permissions can open with the settings intent
  • add uri option parameter to all sections of the app.
  • default uri to null if not provided by the API and pass the null value to the native side.

Questions:

  • Is there a way to test these changes? I'm not able to build the gradle project.
  • Can we add documentation for how to build this repo?

Edit:

  • I tested this in my own repo doing install like so "react-native-send-intent": "git+https://github.com/FrederickEngelhardt/react-native-send-intent/#feat/add-open-settings-uri-context". FYI with this method cache is nasty. Run this if you need to make updates yarn cache clean react-native-send-intent. Symlinks can also work but they require metro workarounds.

I tested this and links work well. So I think this feature is stable. Without the URI nothing will navigate but that's fine.

Example code

    const uri = `package:<package.name>` // must be your test app's package that requires this permission
    openSettings('android.settings.MANAGE_APP_ALL_FILES_ACCESS_PERMISSION', uri)

- support passing uri into the openSettings so menus such as file manager permissions can open with the settings intent
- add uri option parameter to all sections of the app.
- default uri to null if not provided by the API and pass the null value to the native side.
@@ -16,7 +16,7 @@ android {
minSdkVersion _minSdkVersion
targetSdkVersion _targetSdkVersion
versionCode 28
versionName "1.3.0"
versionName "1.3.1"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to roll this back.

@lucasferreira
Copy link
Owner

Hi @FrederickEngelhardt this looks pretty cool ;)

2 similar comments
@lucasferreira
Copy link
Owner

Hi @FrederickEngelhardt this looks pretty cool ;)

@lucasferreira
Copy link
Owner

Hi @FrederickEngelhardt this looks pretty cool ;)

@FrederickEngelhardt
Copy link
Author

@lucasferreira Just following up.

Does this change seem acceptable. If so, can we merge this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants