views:

64

answers:

2

Hi,

I need to open camera from NDK to enhance the performances and I have search several days in internet. But nothing get help.

Does anyone know how to open the camera using NDK?

A: 

NDK and Performance:

Native code is primarily useful when you have an existing native codebase that you want to port to Android, not for "speeding up" parts of a Java app.

Avoid jumping to the NDK because you think it'll improve performance. Stick to Java and use the profiler to work out bottlenecks there.

Nick
But in profiler, we cant measure the exact time for a particular function take to execute?
Amila
No, and that's generally not the point of profiling. You profile before optimising, then try an optimisation, then profile again to compare relative speeds. It might be that your use of NDK is valid - but it might be that your Java code is inefficient. If you post the code that you think is slow, we can see what could be done.
Nick
A: 

The Google website says this:
"The Android NDK is a companion tool to the Android SDK that lets Android application developers build performance-critical portions of their apps in native code."

So rest assured that use of NDK IS for performance improvement!

SKJ