lamelynx / godotgetimageplugin-android Goto Github PK
View Code? Open in Web Editor NEWGodot plugin to select image from gallery or camera on Android device.
License: MIT License
Godot plugin to select image from gallery or camera on Android device.
License: MIT License
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.
Can we enable automatic photo capture with the getCameraImage() method? I need such a feature.
Hi, any option to take video?
add face recognition,
capture it in a window?
To read QR code?
it doesn't work on android 13
I've been trying to generate the .aar file for godot 4 but the 'gradlew.bat assembleRelease' command does not work anymore even after update every dependency. I saw that you need the applicationId "com.gmail.lamelynx.godotgetimageplugin" and I think the problem lies there cause I don't know what else it should be.
Hey Lamelynx, I got your plugin incorporated into my game. I saw your post back here https://godotengine.org/qa/78664/black-texture-when-loading-images-in-runtime-on-android. I am able to load a texture, but all the transparency values are turning to black. I tried to switch load_jpg_from_buffer to load_png_from_buffer but that gives me an error that the file is not a png. Have you figured out how to load an image and keep its transparency? JPG doesn't support transparency.
Hi, app crashes in while opening with custom build and "Godot Get Image" is enabled from plugin. Without that, the app working.
Debugging in Godot version 3.3. The same issue happened in Android and Xiaomi devices. The app camera does not understand the device sensor orientation, consequently, portrait images appears sideways on the screen, landscape images can be upright or upside down. I know nothing about XML and stuff, but the simpliest solution would be to make a viewport in godot, and create a new image with it, the image rotation would be set by the device orientation sensor. I think it could get similar to what WhatsApp does.
I know it's not in stable at this point, but trying to build it with the godot-lib 3.2.4 aar doesn't work. I'm not an Android developer though, so I'm not sure if my code is correct, but here's what I had to do to make it work, at least for the gallery images:
https://gist.github.com/Algorithmus/933e86718fdc735462ccd04e8d764173
Hope it will be useful when you get around to adding 3.2.4 support when it is stable.
I tried making the .aar file like the description said but it gives an error when doing that.
Did some debugging with chatgpt and it builds the .aar file but the plugin doesnt work anymore.
This is from the terminal
./gradlew assembleRelease
Starting a Gradle Daemon (subsequent builds will be faster)
<======-------> 46% EXECUTING [4s]
Transforming godot-lib.release.aar (project :godot-lib.release) with AarToC<======------->
Task :godotgetimage:compileReleaseKotlin FAILED
e: file:///Users/yanis/Desktop/GODOT/GodotGetImagePlugin-Android-master%202/GodotGetImagePlugin/godotgetimage/src/main/java/com/gmail/lamelynx/godotgetimage/GodotGetImage.kt:234:29 Cannot access 'context': it is private in 'Godot'
e: file:///Users/yanis/Desktop/GODOT/GodotGetImagePlugin-Android-master%202/GodotGetImagePlugin/godotgetimage/src/main/java/com/gmail/lamelynx/godotgetimage/GodotGetImage.kt:397:36 Cannot access 'context': it is private in 'Godot'
e: file:///Users/yanis/Desktop/GODOT/GodotGetImagePlugin-Android-master%202/GodotGetImagePlugin/godotgetimage/src/main/java/com/gmail/lamelynx/godotgetimage/GodotGetImage.kt:407:54 Cannot access 'context': it is private in 'Godot'
e: file:///Users/yanis/Desktop/GODOT/GodotGetImagePlugin-Android-master%202/GodotGetImagePlugin/godotgetimage/src/main/java/com/gmail/lamelynx/godotgetimage/GodotGetImage.kt:467:19 Cannot access 'context': it is private in 'Godot'
e: file:///Users/yanis/Desktop/GODOT/GodotGetImagePlugin-Android-master%202/GodotGetImagePlugin/godotgetimage/src/main/java/com/gmail/lamelynx/godotgetimage/GodotGetImage.kt:512:39 Cannot access 'context': it is private in 'Godot'
e: file:///Users/yanis/Desktop/GODOT/GodotGetImagePlugin-Android-master%202/GodotGetImagePlugin/godotgetimage/src/main/java/com/gmail/lamelynx/godotgetimage/GodotGetImage.kt:553:45 Cannot access 'context': it is private in 'Godot'
e: file:///Users/yanis/Desktop/GODOT/GodotGetImagePlugin-Android-master%202/GodotGetImagePlugin/godotgetimage/src/main/java/com/gmail/lamelynx/godotgetimage/GodotGetImage.kt:562:27 Cannot access 'context': it is private in 'Godot'
FAILURE: Build failed with an exception.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
BUILD FAILED in 11s
18 actionable tasks: 18 executed
Could you help please? :)
This is an interesting one. This plugin works great, but it seems like it is creating some problem with this other plugin:
https://github.com/Shin-NiL/Godot-Android-Share-Plugin
The Share plugin was working fine until it stopped suddenly with the following error output:
05-18 15:18:17.911 6314 6394 D godot : sharePic called
05-18 15:18:17.914 6314 6394 E godot : The selected file can't be shared: /data/user/0/com.example.app/files/tempshot.png
05-18 15:18:17.915 6314 6394 E godot : SharePic error: java.lang.IllegalArgumentException: Failed to find configured root that contains /data/user/0/com.example.app/files/tempshot.png
Eventually I got it to work again AFTER I disabled this GetImage plugin
So, when both plugins are enabled the sharing one doesn't work, but when GetImage is disabled sharing works.
There must be something causing an incompatibility when both are enabled that prevents the Share plugin from being able to open/find the image to share.
The issue may very well be fixable by changing something in the share plugin, but is there any idea what can be causing it in the first place? (Already opened an issue in the share plugin's github)
@Lamelynx
Hi, I would love to be able to use the feature of this plugin, (picking a file from the gallery etc), but I am having trouble. I havent used a plugin for Godot before so I am unsure if I am doing it right. Would love some help if you were to see this thanks. Before trying to export with custom template I had it working to export to android. I tried following the steps I could find to do a custom export. Godot stops responding when I try to export so I do not know what the errors could be.
Is it possible to use the front camera directly when calling the get_camera_image method?
Was wondering if you have learned how to store this image, i.e save it into the game so that image can be loaded when the game is closed and started again?
Another idea is if you can gain access to the path var, store the path when saving, and use this to load the images again at runtime?
Hi, is there any fix for this? In some devices its not working.
Hi,
the multi image selection on the example provided does not work. It behaves just like the single selection. Anything I missing?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.