how to access myscene in main.cpp(jni)

i want to access my scene in jni main.cpp but when i call cocos2d::CCDirector::sharedDirector()>getRunningScene i could not get it!
my code :
void Java_tehrannama_test_tehrannama2_zoomIn
{
__android_log_print;
HelloWorld* helloworld = dynamic_cast<HelloWorld*>
>getRunningScene);
helloworld~~>zoomin;
helloworld~~>center.x = helloworld~~>center.x~~10000;

}

Does the scene been created?
When does Java_tehrannama_test_tehrannama2_zoomIn() invoked?
And what’s the problem?

i found the problem actually my mistake! my helloworld layer added as child of current scene and the solution is to tag helloworld when adding and then get it like :
HelloWorld* helloworld = dynamic_cast<HelloWorld*>(cocos2d::CCDirector::sharedDirector()->getRunningScene()->getChildByTag(1));

How did you acess your scene from main.cpp can you please give more detail. I want to make my android view invisible after checking which scene is running ?

in your hellowworld when adding layer to scene add tag to it then in main.cpp use this : HelloWorld* helloworld = dynamic_cast<HelloWorld*>(cocos2d::CCDirector::sharedDirector()->getRunningScene()->getChildByTag(1));

Can you possibly post your HelloWorld.h and main.cpp file in full. I am trying to accomplish the same task but for some reason main.cpp is not recognizing HelloWorld’s functions. I would like to compare to see where the difference is, maybe its something with the includes or way I declared functions.

Thanks.