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

openSettings() function should allow an optional package name #70

Open
hoda0013 opened this issue Jun 18, 2018 · 0 comments
Open

openSettings() function should allow an optional package name #70

hoda0013 opened this issue Jun 18, 2018 · 0 comments

Comments

@hoda0013
Copy link

Android allows developers to open an app's settings menu directly via an Intent. This can be useful if a user has declined a permission and the dev. wants to deep link the user to their app's settings screen so the user can grant the permission. To do this a developer needs to be able to specify an intent name and a package name.

Here's an example of how a developer would need to create an intent to open an app's settings screen:
[(https://developer.android.com/reference/android/provider/Settings.html#ACTION_APPLICATION_DETAILS_SETTINGS)]

I believe an optional argument could be added to the openSettings() method in the android module that, when present, would add the package name as a uri to the intent data:

try { Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.setData(Uri.parse("package:" + packageName)); startActivity(intent); } catch (ActivityNotFoundException e){ e.printStackTrace(); }

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

No branches or pull requests

1 participant