Android : How can i wait for native function returns in java part of code?

on Monday, October 13, 2014


I've got an Android App with native part. At some part of MainActivity I've got a sequence of native callbacks, for example:

...

nativePause();

nativeFinalize();

nativeRecordInit();

nativeSurfaceInit (surfaceHolder.getSurface());

nativePlay();

...

I figured out that the next method was called before the previous one was not finished. What kind of synchronisation between java and native do I need? How should I wait for native method returns? Thanks)


0 comments:

Post a Comment