Ozan Posted December 21, 2021 Posted December 21, 2021 Hi, I am trying to use the PermissionsManager with the new plugin but couldnt figure out how to do it. In the legacy plugin there is an API call for WaveVR_PermissionManager as I can see here https://hub.vive.com/storage/docs/en-us/WaveVR_PermissionManager.html , but this doesnt seem to be the case with the new unity plugin if I am not mistaken? Is there a way to achieve this? @Alex_HTC Best Regards, Ozan 1
Alex_HTC Posted December 21, 2021 Posted December 21, 2021 Hi @Ozan Thanks for reaching out! I'm hoping to clean this up and get something more formal in the future, but here's some proof of concept code that I've used for my own testing purposes: The "sdcard" branch of this URP-example here is a full project:https://github.com/hardcoded2/URP-Example/tree/sdcard The relevant code bits are here:https://github.com/hardcoded2/URP-Example/blob/sdcard/Assets/SampleInit.cs android manifest:https://github.com/hardcoded2/URP-Example/blob/sdcard/Assets/Plugins/Android/AndroidManifest.xml Thanks, Alex 2
Ozan Posted December 22, 2021 Author Posted December 22, 2021 (edited) Hey @Alex_HTC! Thanks a lot for your answer. I tried it out just now, I do get a popup in your project for the 3 permissions that your code asks for. The permission I need is REQUEST_INSTALL_PACKAGES , what I am trying to achieve is an in-app update of my app. I can download it, but when I try to install I think this permission keeps me from installing. When I replaced the permissions in your array with this one however I dont get a popup, and in adb I get the following output: Request for android.permission.REQUEST_INSTALL_PACKAGES granted result: False finished waiting for permission was it successful False Retrying [int] So it doesnt seem to get it. Do you think it is somethings special about this particular permission? Edited December 22, 2021 by Ozan
Marina Posted December 23, 2021 Posted December 23, 2021 Hi @Alex_HTC, I also tried an example from the documentation(https://hub.vive.com/storage/docs/en-us/WaveVR_PermissionManager.html) with code that implements the request for permissions in the application. Requested for android.permission.REQUEST_INSTALL_PACKAGES permission on vive focus 3 headset, the result was "denied"(the same app on previous focus headset grant this permission, all is ok). What solutions could help me get this permission on vive focus 3?I will be gratefull for any help you can provide. Thanks, Marina
Alex_HTC Posted December 23, 2021 Posted December 23, 2021 Hi, I've never seen the usage of REQUEST_INTALL_PACKAGES before, but it does look like according to the documentation that it's not designed for regular application developers like you or me.https://developer.android.com/reference/android/Manifest.permission#INSTALL_PACKAGES Quote Allows an application to install packages. Not for use by third-party applications. In other words, if android itself isn't denying you, it seems likely we are for security reasons. I'm really not sure about the valid usecases for something like this nor what the pitfalls might be. sometimes there are additional android manifest entries, but this seems like a really specific ask with a very specific set of idiosyncratic issues. I'm not sure that helped, but what drives the need for this permission? -Alex
Ozan Posted January 20, 2022 Author Posted January 20, 2022 Hi @Alex_HTC Sorry for the late answer, yes this helped to see that what we tried the achieve wont be possible, so we decided not to pursue it. Best, Ozan
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now