Comments (6)
ok, noted! Thanks :) I'll report back with how it goes with the review team.
from unitynativegallery.
We received this feedback from the Google Play featuring team who require us to remove permissions we dont utilise.
from unitynativegallery.
Temporarily modified the manfiest with the follownig:
internal void ModifyFileAccessPermissions()
{
// NativeGallery plugin requires these permissions, but we dont
// perform read operations so remove them from the manifest
RemovePermission("android.permission.READ_EXTERNAL_STORAGE");
RemovePermission("android.permission.READ_MEDIA_IMAGES");
RemovePermission("android.permission.READ_MEDIA_AUDIO");
RemovePermission("android.permission.READ_MEDIA_VIDEO");
// NativeGallery plugin requires this permission, but its not
// required for Android 10 and above
AddOrRemoveTag(
"/manifest",
"uses-permission",
"android.permission.WRITE_EXTERNAL_STORAGE",
true, true,
KeyValuePair.Create("maxSdkVersion", "28")
);
}
internal void RemovePermission(string permissionName)
{
AddOrRemoveTag(
"/manifest",
"uses-permission",
permissionName,
true, true,
KeyValuePair.Create("maxSdkVersion", "1")
);
}
where I 'remove' permissions by setting the max sdk version to 1. I tried to actually remove the permissions here (remove the XML node) but it gets re-appended for some reason.
from unitynativegallery.
I've seen some screenshots of what I presume the same warning in the past and it wasn't a requirement in those screenshots, only a suggestion. Don't know if they've changed anything but I'd doubt it because these permissions don't take effect until the permission dialog is presented to the user.
Regardless, you can open NativeGallery.aar file with 7-zip or WinRAR (don't unzip, just open it), remove the permission from AndroidManifest.xml inside it and then return to 7-zip/WinRAR. Program'll ask you whether or not the contents of the archive should be updated.
from unitynativegallery.
Hey thanks for the reply! These are 'must resolve' issues reported to us by the Google Review team for app featuring. The permissions they have issues with are
• READ_EXTERNAL_STORAGE
• WRITE_EXTERNAL_STORAGE
and we are required to remove it unless we can show and explain to them why we need them.
We don't want to modify and maintain our own version of this package. I will move forward with the hack where I set the maxSDK version to 1 - this seems to remove the permission from the list of permissions in the App Info page, so hopefully this will satisfy the requirement.
I think if the permissions were added via IPostGenerateGradleAndroidProject callback we could execute our own callback after yours and strip them out ourselves. But (I think) because the permissions are defined in your own manifest they get 'merged in' at a later point and it is too late for me to strip them by then. (Well after IPostGenerateGradleAndroidProject)
Though I am not sure which version of Unity 'IPostGenerateGradleAndroidProject' was introduced in, so it might not be that simple of a change.
from unitynativegallery.
Without declaring the permissions myself, I've seen cases where even setting Write Permission in Player Settings to External (SD Card) wouldn't add WRITE_EXTERNAL_STORAGE permission to the plugin, possibly because another plugin was force deleting that permission. After having to deal with numerous missing permission cases, I've decided to add the permission to the manifest myself. All was well so far since the permissions aren't granted automatically but rather via user consent. In the future, I may need to think of something else as you've suggested.
I'd like to remind you that this plugin seldomly gets updates so if your current hack fails at some point, maintaining your own version of the plugin may still be viable.
from unitynativegallery.
Related Issues (20)
- LoadImageAtPathAsync crash HOT 3
- IOS 17 - WhatsApp videos HOT 7
- Undefined symbols for architecture arm64 HOT 2
- NativeGallery.GetImageFromGallery Not working on Windows HOT 1
- Is there any way for me to display a dialog box asking for permission to access the album? HOT 1
- Unity Android Playform Build 'UnauthorizedAccessException' cant read file path is denied HOT 2
- v1.7.9 ERROR com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable HOT 2
- VisionOS Support for VisionOSVideoComponent HOT 30
- Where does the screenshot go when using the editor?
- Unity 2023 support HOT 5
- When the Android phone pops up to confirm the authorization, click Allow and get stuck. HOT 10
- iOS Ad Privacy Manifest HOT 1
- Can't open *.heic files HOT 8
- DirectoryNotFoundException: Could not find a part of the path "/storage/emulated/0/Android/data HOT 2
- SaveAudioToGallery method is private HOT 1
- iOS GetImageFromGallery show all photos event if PHAuthorizationStatusLimited HOT 2
- Unable to Save Images/Videos (IOS) HOT 2
- How to disable permission request on launch and instead use Runtime permissions HOT 2
- Plugin is not working for android 13 and above HOT 4
- When I use the AR camera I can't use the method "GetImageFromGallery" to select the picture, and call back is null HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unitynativegallery.