1. In general, we no need to change the native code (generally its
big) and compiled and create the Static/ Shared library.  (Android-NDK
Bionic)

2. Next create JNI wrappers for all interfaces those are exposed to
outside world from Native libs and generate another library. (Here JNI
comes to picture).

3. Create a Android Application using JNI lib interfaces.

Thanks


On Jun 28, 4:38 pm, Padma <reachoutforpa...@gmail.com> wrote:
> Hi Tamman,
>
> Thanks for ur reply.
>
> U wrote that "To compile any C application(customized  lib is Bionic
> which contains cross tool chains, set of header files fordifferent
> libs etc.),we need NDK ..
>
> But JNI have its own syntax to write native code and to compile it.
> Then Why NDK?
>
> I m afraid whether i have wrong understanding .If So,Plz clarify my
> doubt .
>
> Thanks,
> Padma
>
> Tammana wrote:
> > JNI is generic concept,  It is the way to integrate your Java programs
> > with legacy C/C++ code, including the ability to embed a JVM within
> > your native applications. Any Java application want to communicate
> > with Native application through JNI.
>
> > NDK: This is Android specific. To compile any C application we need
> > libc library. For Android they have customized C-library is Bionic. It
> > also contains several cross tool chains, set of header files for
> > different libs etc.
>
> > So if you want to compile any C/C++ application you need NDK. This
> > native application you want to use in Android applications (Java
> > level) you need JNI.
>
> > Any Android application(Java) will run in DVK. I guess DVK is also
> > customized JVM for Android. If you create any native application which
> > will run in native level not in DVK.
>
> > In general we have to create Native library and those need to use in
> > Android Applications (Java) using JNI. It means this application will
> > execute in DVK. If your native library create fork() and generate
> > child process, this child process may not run in DVK. It may run in
> > native level and DVK does not have any handle on it.
>
> > Thanks
>
> > On Jun 28, 1:51 pm, Padma <reachoutforpa...@gmail.com> wrote:
> > > Hi all,
>
> > > Can somebody explain the basic difference between NDK & JNI.
> > > Why Android uses NDK instead of JNI?
> > > How NDK differs from JNI?
> > > Can I use JNI in DVM instead of NDK?(is jni compatible with dvm)
>
> > > Kindly share some valuable  info about NDK and JNI.
>
> > > Regards,
> > > Padma

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to