Lamelynx / GodotGetImagePlugin-Android

Godot plugin to select image from gallery or camera on Android device.
MIT License
71 stars 4 forks source link

Issues upgrading project from Godot 3.2.3 to 3.4.4 #13

Closed ssalvate closed 1 year ago

ssalvate commented 1 year ago

I have a project that has been using your plugin with Godot 3.2.3. I am upgrading in order to export as an .aab. I updated the engine and copied over the precompiled binaries for 3.4.4. However, I can't get the permissions window to pop-up now. I have run the Example you gave and that works as expected on my phone. I then tried combining the example with my project in various ways but can't find what is causing the problem.

ssalvate commented 1 year ago

When debugging with android studio, both projects return ""Application has not permission: android.permission.READ_EXTERNAL_STORAGE" on first use. The example project then returns "Permission resend: false" , "User won't grant permission, explain why it's important!", "Call - resendPermission". In my game project though, after the first msg, it just says "PlayerBase::Pause() from I Player."

ssalvate commented 1 year ago

Are there any things that have changed from 3.2.3 to 3.4.4 that I need to be aware of? I could not find any special differences. Only thing I noticed is that Image is its own scene? Thanks a ton if you are able to help.

Lamelynx commented 1 year ago

I am not aware of any breaking changes. Try to remove app data/cache from your phone. Ha you choose to decline permission and choose to newer accept it?

ssalvate commented 1 year ago

Ya I removed all instances of the game from my phone. I am not getting any prompt to approve or deny the permissions. Oh ya, after the PlayerBase::Pause line im also getting "Compat change id reported: 78294732; UID 10302; state: DISABLED". I then used this to toggle "CALL_ACTIVITY_RESULT_BEFORE_RESUME" in dev options on my phone, but didnt fix it, simply removed that msg.

ssalvate commented 1 year ago

Update: The problem seems to be caused by turning Write to external-on in the Godot export settings. When I apply this to the Example project it also stops working. When I toggle off external write in both projects(my game and the example) the prompt shows and you can load an image. However, I need to be able to write to external for saving the images. Thanks

ssalvate commented 1 year ago

Tentative fix: I updated to Godot 3.5.1, 3.5 added full support for android scoped storage changes. With minimal testing this seems to be allowing my saving to work properly again, without enabling external storage in the export settings.