Coder Social home page Coder Social logo

lamelynx / godotgetimageplugin-android Goto Github PK

View Code? Open in Web Editor NEW
65.0 7.0 4.0 875 KB

Godot plugin to select image from gallery or camera on Android device.

License: MIT License

GDScript 19.82% Kotlin 80.18%
godot android godot-engine godot-plugin

godotgetimageplugin-android's People

Contributors

lamelynx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

godotgetimageplugin-android's Issues

Issues upgrading project from Godot 3.2.3 to 3.4.4

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.

Auto Capture

Can we enable automatic photo capture with the getCameraImage() method? I need such a feature.

Video and QRcode

Hi, any option to take video?
add face recognition,
capture it in a window?
To read QR code?

Issues with godot 4

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.

Png file transparency turns to black

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.

App crashes

Hi, app crashes in while opening with custom build and "Godot Get Image" is enabled from plugin. Without that, the app working.

Problems with camera orientation

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.

3.2.4 Support

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.

Does not work with 4.2beta

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.

  • What went wrong:
    Execution failed for task ':godotgetimage:compileReleaseKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details

  • Try:

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? :)

Causing some incompatibility with Godot-Android-Share-Plugin

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

Trying to use project in 3.2.3

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.

Question

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.