Setting the Callback Object for the Instruction Stream Engine
Application Scenario
Set the callback object for the instruction stream engine.
Prerequisites
- A JNI callback object for the instruction stream engine has been created.
- The activity has implemented the NativeListener API.
Development Process
- Call the callback initialization API.
- Set the callback object.
Encoding Instance
public class Activity implements NativeListener {
private JniCallback jniCallback = new JniCallback();
protected void onCreate(Bundle savedInstanceState) {
jniCallback.setNativeCallback();
jniCallback.setNativeListener(Activity.this);
}
}
Parent topic: API Development Process