MLV-app android version

Started by tommydev, December 26, 2024, 07:44:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tommydev

https://vimeo.com/1024993862
(I don't know why vimeo link insert pops up 404 on preview so I added link. Sorry for inconvenience)

I did a little bit of works on MLV-app(https://github.com/ilia3101/MLV-App).
All you can do it I know is open MLV files and play it.

The problem is I put a file path with a hardcoded string,
one big problem is that you should select files through a device name list on a file picker
(not like Download, Document... etc)
(like around 7s in vid, look at a selected list where sky color background with blue color text exists)

For internal storage(e.g. Download, Document, etc) all devices maybe work fine.
However, OTG drive would work with some devices.
(I tested with two devices, POCO X3 NFC works fine but Lenovo P11 doesn't work.)
One more thing, android fully support exFAT over 4.1
(I confused with NTFS. Sorry for my misinterpretation)
so some devices will have a problem on connecting.

I made it for checking captured vids.
I just wanna know is a powerful device play more frames.

Please check here(https://github.com/RIP-tommy/MLV-App/tree/Android)
to build and get a APK file.

Please let me know your opinions.
Thanks for reading these!
Have a nice day:)
Quote
More...

GanglyPit

Man this is amazing! im gonna try it asap, thanks!

masc

Hej great work. I am waiting for this since years. So you still used Qt for doing this? This is what I recommended all the time. Cool you tried that! And it looks it wasn't too hard?!
I think dng export, and single picture export should work, too, right? (Those are realized using Qt-libs and/or are natively implemented.) For ffmpeg export the work should be harder, as I don't know if tunnels are supported in any way on Android, and if there is a cmd ffmpeg out there at all.
5D3.113 | EOSM.202

masc

Are you able to find some kind of define which works for the .pro file and for the cpp files for Android? If you get the few lines #ifdef ANDROID (or whatever), we could add your changes to the official repo - if you like. Unfortunaltely I currently have no way to test (no android in the near), but it is great you are doing this!

Edit: Ah... I see, partially you already have this in the cpp. I'd use this also for the Android.h include. And also for all those Android files in the project, described from .pro file.
5D3.113 | EOSM.202

tommydev

Quote from: masc on December 29, 2024, 07:40:06 PMI think dng export, and single picture export should work, too, right?
I tried with my device(POCO X3 NFC - android 12) and emulator(android 14) both failed to extract CDNG. I think an additional file write permission required related to SAF.

Quote from: masc on December 29, 2024, 07:49:43 PMEdit: Ah... I see, partially you already have this in the cpp. I'd use this also for the Android.h include. And also for all those Android files in the project, described from .pro file.
Yes, I did. In the MainWindow.cpp file, I used #ifdef Q_OS_ANDROID ... #endif. In the .pro file, actually qt did jobs for android.
I only edited the MainWindow.cpp. Add Android.h at the very above, requestAllFilesAccess() in the MainWindow::MainWindow method, some lines for converting uri to path in the void MainWindow::on_actionOpen_triggered method.
A minute before, I edited the cpp file to wrap a android header line with conditional lines.

Quote from: masc on December 29, 2024, 07:49:43 PMwe could add your changes to the official repo - if you like.
I would be grateful if you do that. However, I didn't test with a desktop env(MacOS or Windows) so it's all up to MLV-app contributors.

masc

We need to ifdef the android include itself too, because it won't compile with it for other platforms (I think).

mainwindow.cpp
...
#ifdef Q_OS_ANDROID
#include "AOS/Android.h"
#endif
...


ChatGPT tells we should try this in the .pro file:
# For Android
android {
    message("Building for Android")
    INCLUDEPATH += $$PWD/<...just in case another path is needed...>/android_specific_include
    SOURCES += AOS/RequestPermissions.cpp
    HEADERS += AOS/Android.h
    DISTFILES += android/AndroidManifest.xml \
          <...all the other files...>
}
Therefor remove the added files from the other places. Could you test this please?

Quote from: tommydev on December 30, 2024, 05:16:01 PMI tried with my device(POCO X3 NFC - android 12) and emulator(android 14) both failed to extract CDNG. I think an additional file write permission required related to SAF.
What a shame. Maybe you're right. Any chance you can test this?

5D3.113 | EOSM.202

tommydev

Quote from: masc on December 30, 2024, 07:49:13 PMTherefor remove the added files from the other places. Could you test this please?

I did what you asked for. I also tested silicon mac and android-arm64 compile, desktop environment doesn't include android related files. Moreover when select macos build configuration, qmake does not include qt library related android at all.

Quote from: masc on December 30, 2024, 07:49:13 PMWhat a shame. Maybe you're right. Any chance you can test this?

I'll give it a try but I can take a time. I'm gonna reply after trying some solutions.

masc

5D3.113 | EOSM.202

tommydev

https://vimeo.com/1049607224?share=copy

Yes It works:) I didnt test save a cdng to otg(external) drive.
One phone stopped working:(

masc

OMG! Let the dream come true! :-D Great work!
5D3.113 | EOSM.202