Android NDK

by satish bhoyar » Tue, 18 May 2010 20:37:34 GMT


Sponsored Links
 Hi all,

How i can download android NDK?

thanks
satish

--



Android NDK

by Rog茅rio de Souza Moraes » Tue, 18 May 2010 20:40:55 GMT


 Hi Satish,

here is the link were you can find it:

 http://developer.android.com/sdk/ndk/index.html 

Regards,

Rogerio

2010/5/18 satish bhoyar <getsatonl...@gmail.com>

>


Sponsored Links


Android NDK

by satish bhoyar » Sat, 22 May 2010 21:25:06 GMT


 Hi Rogerio,

Thanks for the link.
Do you know any link on the tutorial to use this ndk , how to write any code
for the same.?

thanks,
satish

2010/5/18 Rogrio de Souza Moraes <rogerio.so...@gmail.com>

>>



Android NDK

by Rog茅rio de Souza Moraes » Mon, 24 May 2010 19:32:01 GMT


 Hi Satish,

i recomend that you compile the samples that comes with it. This is how I
learned how to use the NDK.

Regards,

Rogerio

2010/5/22 satish bhoyar <getsatonl...@gmail.com>

>>>



Android NDK

by satish bhoyar » Mon, 24 May 2010 19:39:32 GMT


 Ok thanks ...Rog...:)

2010/5/24 Rogrio de Souza Moraes <rogerio.so...@gmail.com>

>>>>



Android NDK

by Lee Clemens » Tue, 25 May 2010 02:14:11 GMT


 Examples are available via the same link

-----Original message-----
From: satish bhoyar <getsatonl...@gmail.com>
To: android-developers@googlegroups.com
Sent: 2010 May, Sat, 22 13:24:45 GMT+00:00
Subject: Re: [android-developers] Android NDK

Hi Rogerio,

Thanks for the link.
Do you know any link on the tutorial to use this ndk , how to write any code
for the same.?

thanks,
satish

2010/5/18 Rogrio de Souza Moraes <rogerio.so...@gmail.com>

>>



Android NDK

by Padma » Mon, 28 Jun 2010 08:51:16 GMT


 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

-- 



Android NDK

by Tammana » Mon, 28 Jun 2010 10:42:59 GMT


 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




-- 



Android NDK

by Padma » Mon, 28 Jun 2010 11:39:05 GMT


 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






-- 



Android NDK

by Tammana » Mon, 28 Jun 2010 12:41:42 GMT


 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







-- 



Android NDK

by Raj Singh » Mon, 28 Jun 2010 17:51:59 GMT


 NDK is android's framework to use JNI.




> website: 



Android NDK

by Dianne Hackborn » Mon, 28 Jun 2010 22:57:36 GMT


 This really doesn't belong on android-kernel.  Discussion about the NDK is
on android-ndk; please read past messages of the group, because I think all
of your questions are covered there and in the NDK documentation.




> website: 



Android NDK

by Anshuman Tripathi » Wed, 05 Jan 2011 02:58:37 GMT


  am new guy for android. I am trying to use NDK in my Test Project.
After getting MAKE APP successfully. I will get .so file but when I
started my Test project
its not able to load the file. It showing the error like "unsatisfied
link error" .

logcat message like

: >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 275): CheckJNI is ON
D/AndroidRuntime( 275): --- registering native functions ---
I/ActivityManager( 65): Starting activity: Intent
{ act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x10000000
cmp=cem.net.NDKDem/.NDKDem }
D/AndroidRuntime( 275): Shutting down VM
I/AndroidRuntime( 275): NOTE: attach of thread 'Binder Thread #3'
failed
D/jdwp ( 275): adbd disconnected
W/ActivityManager( 65): Activity pause timeout for
HistoryRecord{43fa6198 com.android.launcher/
com.android.launcher2.Launcher}
I/ActivityManager( 65): Start proc cem.net.NDKDem for activity
cem.net.NDKDem/.NDKDem: pid=282 uid=10036 gids={}
W/dalvikvm( 282): Exception Ljava/lang/UnsatisfiedLinkError; thrown
during Lcem/net/NDKDem/NativeLib;.<clinit>
D/AndroidRuntime( 282): Shutting down VM
W/dalvikvm( 282): threadid=1: thread exiting with uncaught exception
(group=0x4001d800)
E/AndroidRuntime( 282): FATAL EXCEPTION: main
E/AndroidRuntime( 282): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 282): at
cem.net.NDKDem.NDKDem.onCreate(NDKDem.java:21)
E/AndroidRuntime( 282): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1047)
E/AndroidRuntime( 282): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2627)
E/AndroidRuntime( 282): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2679)
E/AndroidRuntime( 282): at android.app.ActivityThread.access
$2300(ActivityThread.java:125)
E/AndroidRuntime( 282): at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime( 282): at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 282): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 282): at
android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 282): at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 282): at
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 282): at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 282): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 282): at dalvik.system.NativeStart.main(Native
Method)
E/AndroidRuntime( 282): Caused by: java.lang.UnsatisfiedLinkError:
Library ndk_dem not found
E/AndroidRuntime( 282): at
java.lang.Runtime.loadLibrary(Runtime.java:461)
E/AndroidRuntime( 282): at java.lang.System.loadLibrary(System.java:
557)
E/AndroidRuntime( 282): at
cem.net.NDKDem.NativeLib.<clinit>(NativeLib.java:6)
E/AndroidRuntime( 282): ... 14 more
W/ActivityManager( 65): Force finishing activity
cem.net.NDKDem/.NDKDem
W/ActivityManager( 65): Activity pause timeout for
HistoryRecord{43e3b3b8 cem.net.NDKDem/.NDKDem}
I/ActivityManager( 65): Displayed activity com.android.launcher/
com.an



Re: Android NDK

by Rocky » Fri, 07 Jan 2011 14:14:37 GMT


 i,

but i'm not able to run make command.

can u give me step by step procedure upto this point....

u can send me at rkjhaw1...@gmail.com

thanks in advance..

On Wed, Dec 29, 2010 at 3:13 PM, Anshuman Tripathi <
anshuman.tripat...@gmail.com> wrote:





--
Thanks & Regards

Rakesh

--



Other Threads

1. Urgent! can't update apps in market. No error message

However, on the device, you can uninstall the previous app, and
install the new updated app signed with a different private key (or
keystore file).

The problem is with the uploading update in the Android Market.  There
must be a way to allow the developer to change the private key for
published applications for many reasons.  The developer may lost the
keystore file due to a reinstallation of the comptuter.  The private
key may be revealed to the public and the developer should have a way
to indicate the old key is invalid in the market.

Still needs help URGENTLY!  Considering my customers !!!

Thanks





--~--~---------~--~----~------------~-------~--~----~

2. SensorManager misbehaving on emulator when app was taken to 1.5

Hi guys,

I am developing an app that relies heavily on sensors.

Last night I've installed the 1.5 SDK and the app that was running
fine on 1.1 is no longer doing so. Using logcat, I could spot that the
problem is when a new sensor manager instance is to be created. From
my working app, I isolated the call into this very simple Activity:


package uk.co.bunda;

import android.app.Activity;
import android.content.Context;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.util.Log;

public class Test3 extends Activity {
    private SensorManager mSensorManager;

        /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        Context ct = getBaseContext();
        Log.e("TEST","Before sensor manager");
        this.mSensorManager = (SensorManager)ct.getSystemService
(SENSOR_SERVICE);
        Log.e("TEST","After sensor manager");
        setContentView(R.layout.main);
    }
}

Then observed the logs with DDMS's logcat:


I/ActivityManager(  567): Starting activity: Intent { flags=0x10000000
comp={uk.co.bunda/uk.co.bunda.Test3} }
D/AndroidRuntime(  833): Shutting down VM
D/dalvikvm(  833): DestroyJavaVM waiting for non-daemon threads to
exit
D/dalvikvm(  833): DestroyJavaVM shutting VM down
D/dalvikvm(  833): HeapWorker thread shutting down
D/dalvikvm(  833): HeapWorker thread has shut down
I/dalvikvm(  833): De{*filter*} has detached; object registry had 1
entries
D/dalvikvm(  833): VM cleaning up
D/dalvikvm(  833): LinearAlloc 0x0 used 638076 of 4194304 (15%)
I/ActivityManager(  567): Start proc uk.co.bunda for activity
uk.co.bunda/.Test3: pid=841 uid=10019 gids={}
E/TEST    (  841): Before sensor manager
D/qemud   (  546): fdhandler_accept_event: accepting on fd 10
D/qemud   (  546): created client 0xc088 listening on fd 14
D/qemud   (  546): client_fd_receive: attempting registration for
service 'sensors'
D/qemud   (  546): client_fd_receive:    -> received channel id 10
D/qemud   (  546): multiplexer_handle_control: unknown control message
(26 bytes): 'ko:connect:0a:service busy'
W/ActivityManager(  567): Launch timeout has expired, giving up wake
lock!
W/ActivityManager(  567): Activity idle timeout for HistoryRecord
{436aeee0 {uk.co.bunda/uk.co.bunda.Test3}}
D/dalvikvm(  611): GC freed 644 objects / 34808 bytes in 305ms

At this point the app blacks out and eventually asks to be forcefully
closed.

As you can see, the execution never gets to the second log message.

Although having read that the sensor manager changed, I saw that the
way to instantiate it did not change at all.

Any help/clue much appreciated! This is driving me insane. :)

Cheers

Cass
--~--~---------~--~----~------------~-------~--~----~

3. Sending touchevents in Android

4. conversion to dalvik format failed with error 1

5. ViewFlipper - showView(2) functionality rather than just showNext()

6. ViewFlipper - showView(2) functionality rather than just showNext()

7. ListView Entries