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

Remove QUERY_ALL_PACKAGES permission #3

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,24 @@ First, add `appcheck` as a [dependency in your pubspec.yaml file](https://flutte
- `isAppEnabled(String uri)` (only for **Android**)
- `launchApp(String uri)`


## Permissions
If you want to use the getInstalledApps() function, you need the QUERY_ALL_PACKAGES permission.

```
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
```

If you only want to check certain apps and you know the packageName, add them via querie in AndroidManifest.xml.

```
<queries>
<package android:name="com.google.android.apps.maps"/>
</queries>
```



Check out [Example](https://github.com/Yash-Garg/appcheck/blob/develop/example/lib/main.dart).

## Screenshots
Expand Down
8 changes: 7 additions & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.yashgarg.appcheck">

<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<!-- <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
Each user of this package must decide for themselves. Use this permission or add the known packagenames per queries.
Example:
<queries>
<package android:name="com.google.android.apps.maps"/>
</queries>
-->

</manifest>