Anonymous innerclass using JNI Code

When i made a java call; it will do some background tasks, after completion it should return/call to C**/native method of same class
How to write anonymous inner class using JniHelper.h ?

<pre>
//C** code
public void callJavaTos()
{
JniMethodInfo methodInfo;
if (! JniHelper::getStaticMethodInfo(methodInfo, CLASS_OPEN_NAME, “askAcceptTOS”, “()V”))
{

return;
}

methodInfo.env~~>CallStaticVoidMethod;
methodInfo.env~~>DeleteLocalRef(methodInfo.classID);
}

public void fromJavaCallback()
{
// do some thing
}

//Javacode
public interface AfterTos
{
void userActionPerformed(boolean accepted);

void userTosAccepted();

}

public void askAcceptTOS()
{
//some background tasks
SomeService( new AfterTos() {

`Override
public void userTosAccepted() {
fromJavaCallback()

        }

        `Override

public void userActionPerformed(boolean accepted) {
//

});

}
public static native fromJavaCallback();

Are you asking how to callback from fromJavaCallback() to class A?
Then, how about make class A using Singleton pattern?
If you make class A with Singleton pattern, you can call it’s method from anywhere( even in jni file that has fromJavaCallback() method …)