4 ms·
Getting native libraries to work well on Android is a beast. I happened to have done exactly what you're describing though, specifically rendering libusb throug
by kevmo314 2y ago
Getting native libraries to work well on Android is a beast. I happened to have done exactly what you're describing though, specifically rendering libusb through an Android phone. My code is at https://github.com/kevmo314/kineticstreamer https://github.com/kevmo314/kineticstreamer and you might be particularly interested in the CMake build at https://github.com/kevmo314/kineticstreamer/blob/main/app/src/main/jni/CMakeLists.txt https://github.com/kevmo314/kineticstreamer/blob/main/app/sr...
Happy to answer any questions or help you out if you decide to keep going down this road, shoot me an email at kevmo314@gmail.com. Ultimately an Android phone is still just a Linux computer but jumping through the hoops is definitely hard.
- ssahoo 2y agoIt's not that awful once you get hang of it, but it's a mess made by google. Kotlin which is maintained Jetbrain is catching up. Google is far less interested in owning kotlin. Therefore creating a confusion with mix of grovy, maven, java and xml as hell.
- clumsysmurf 2y agoDon't forget Android 15 changes pagesize from 4K to 16K, and you have to recompile those ... https://developer.android.com/about/versions/15/behavior-changes-all#16-kb https://developer.android.com/about/versions/15/behavior-cha...
- iiJDSii 2y agoHey thanks for this! I gave it a try, imported and built in my Android Studio ("Koala" if that matters), tried getting it installed on a phone, and unfortunately got this cryptic error: > ninja: error: 'lib/libjpeg.so', needed by 'C:/Users/ADMIN/AndroidStudioProjects/kineticstreamer/app/build/intermediates/cxx/Debug/3xf5p505/obj/arm64-v8a/libkinetic.so', missing and no known rule to make it That being said, I browsed through the code some more and while I think it's a great Android project, I don't think (assuming I got it working) it would be advisable for me to build on top of this. The existing complexity, and my lack of faith on cross-compatibility (different phones, SDK updates, etc) are a turn off. Heck I've even seen certain libraries and includes fail because they require different versions of Java/JDK that I have available. So in summary, I think the solution for myself at least for now, will be to explore a different hardware route. A cheap raspberry pi equivalent, with a small display, and battery - annoying to have all these extra components but at least I know it'll work reliably.
- rasz 2y ago>got this cryptic error: > 'lib/libjpeg.so' missing whats cryptic about that?
- WkndTriathlete 2y agoI get the sense that the only development environment the OP knows at all is Python. With that perspective I understand why they might think that error is cryptic.
- skydhash 2y agoPeople keeps forgetting that pretty much everything is C-based and only a few language ecosystems have abstracted it away enough. And even then, if you want to program in slightly esoteric environment, you have to confront that fact. Just understanding how C/C++ projects are used (libraries, header file, linking,...) can get you really far if you have to stray from the happy path.