I want to know how to display a DICOM file on the Android OS ? Can I do it?
Some are using DCMTK (http://www.dcmtk.org) on Android via Android NDK to acces DICOM. There's a discussion about it on the DCMTK forums here: http://forum.dcmtk.org/viewtopic.php?t=2960&sid=868791a13b4d266998284b921c4bfe8c
Imebra now includes JNI wrappers for Android and comes with a pre-built jar that includes java classes and so libraries with native code.
It is possible to access the Pixelmed Java DICOM Toolkit on Android, http://www.pixelmed.com . You should be able to use some of its functionality without even recompiling the JAR.
Related
I have looked at Use prebuilt JNI library in Android Studio 3.1 and How to use .so in a second project in Android?. The first is trying to get a library file without headers working and the other seems to be focusing on a specific issue with his build (although there's some useful information there). I'm relatively new to app development and especially to native development on android. I've gotten a build with the JNI library and some c++ code working, but that seems to be just for building from source.
It's probably a simple answer, but I haven't been able to find documentation on this specifically in the android developers documentation. I'm interested in understanding the correct (or most conventional) place to put and way to use a precompiled library (module/lib/*.so and module/include/*.h) in an android project. Would I even need to use JNI or the NDK if the library is built with another build tool? Another project I have has a native library source object (*.so) in ./obj/local, ./libs, and in many other folders related to JNI. I'm guessing it would be somewhere in there, but I'd like to know what is conventional.
For some context, I'm trying to work with the essentia library. I have followed the guide on compiling for Android and have a build with the general hierarchy mentioned above (essentia/lib and essentia/include) that seems to be working.
I am currently working on an android project that requires me to make use of functions included in a shared library (.so). I also only have header (.h) files for the library provided to me.
Is it possible to work with just these two files? Or do I need to create my own implemenations via c++ codes?
I am using Android Studio intend to use CMake.
Regards,
Philip
Most Android apps are written in Java. Google has released the Native Developer Kit (NDK) in order to allow developers to write libraries in C++. However, these libraries are usually very low level and called from the Java code which defines the UI and higher-level app logic. Most likely you will need to write a wrapper for the library so that you can call it from Java code. Looks like this blog is a good place to start.
I have developed a library for Windows in VS2013. It does not have a GUI, only (mathematical) code.
I would now like to create an APK file so that I can use my library on Android.
I hope that I don't have to re-write everything from scratch for Android.
What would currently be the best solution so that I can keep most of my C++ files while creating the APK?
Thank you for the help!
You can compile your library with the Android NDK, which produces a .so file.
Android applications are written in Java. To use your library, you should first load your .so library and then you can access its function via JNI.
I have a huge C++ library for image processing. I would like to use this DLL library in an Android project. How can I call methods in the C++ DLL library in Android?
Maybe you can try JavaCPP. JavaCPP will help you auto generate appropriate code for JNI, and passes it to the C++ compiler to build a native library.
For more details and examples, please seeļ¼ https://code.google.com/p/javacpp/
via JNI Java Native Interface.
using this keyword will let you find a tutorial:
http://developer.android.com/training/articles/perf-jni.html
You need the Java Native Interface (JNI)
Oracle has a great set of tutorials on it (google for them).
Also, since you tagged your question Android, I'm presuming that's the platform you need JNI on.
You'll have to look into the Native Development Kit, more info on that here: http://developer.android.com/tools/sdk/ndk/index.html
Hey guys!
I've been working on c++ application lately which has to be run on Android 2.1 and 2.2.
so I am wondering if I have complete c++ application can I just put it into *.so file and then create android project and just simply load this library using System.loadLibrary(blalba.so);
would it work?
Yes you will have to recompile all the native libraries specifically for Android. Yes, you do need the source code for all 3rd party native libs you plan to use simply because Usually when we compile and link these libraries outside Android they are linked to glibc but unfortunately Android doesn't use glibc due to liscence and performance issues. Android uses a watered down version of glibc called libc. It has matching symbol names to glibc for most of the usual functionalities. But as far as i know the libc doesn't have some functionality related to Strings and it definitely doesnt have some posix support. If your native libraries are using any of the deprecated functionality you will have to find workaround for those by using alternative functionality supported by libc and coding your libs accordingly.
Also, as you righty pointed out you will have to use the NDK to interface Java(Android app/fwk) to native world(C++).
Though this sounds pretty simple in my experience compiling native libraries on Android(Android porting) has traditionally been very time consuming with no guarantee of sucesses.