user2508941
user2508941

Reputation: 245

Under Android NDK, can a native window be created without Java calls to retrieve the surface?

I am trying to develop an android app fully in native code using C++. The Android NDK api's are using a Java object. For example I saw the method:

int32_t ANativeWindow_getHeight(ANativeWindow* window);

But to create an ANativeWindow I need a Java Surface Object.

ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface);

Is there any other way to get the details without using any java objects?

I do not want to use a Java callback.

Upvotes: 3

Views: 2250

Answers (1)

user2508941
user2508941

Reputation: 245

This is not possible... After a long time I have realized it. The answer will be to use some third party libraries which will in turn provide the the api's via java call back. So call back is the only solution available.

Upvotes: 1

Related Questions