cengiz-pz / godot-android-share-plugin

Godot Android Share plugin allows sharing of text and images on Android platform
MIT License
14 stars 2 forks source link

Can we implement sharing audio files? #5

Open Overvault-64 opened 3 months ago

Overvault-64 commented 3 months ago

Hi dev,

I used to maintain a library that aimed to implementing several Android features in Godot apps and games. Actually, I never really knew what I was doing lol so now I'm having a really hard time migrating it the new Android 14 specs. Also, I now disagree with myself about the foundations of the projects, so I don't want to develop it anymore.

Nonetheless, I was able to generalize the file sharing function so it could handle different types of files. It worked with audio files at least.

Can you please cannibalize my API so yours can handle audio files as well?

Here's the file

Thanks in advance

Overvault-64 commented 3 months ago

Hey @cengiz-pz, I did something apparently. At first, I tried writing new classes from ground up, but nothing seemed to work. Then I just replaced

private static final String MIME_TYPE_IMAGE = "image/*";

with

private static final String MIME_TYPE_IMAGE = "*/*";

in your SharePlugin.java and it worked. If I try to properly generalize (like renaming objects and functions to match their new purpose), everything stops working. Don't ask me why.

Only drawback is that Telegram doesn't like it (while it instead liked my old plugin), but quite every other chat and email client does. Weird stuff uh

Maybe you can start from this commit in my fork