How to startActivity from SimpleApplication

I am creating a game and i want to create the UI’s with Android specific API.



I am able to create a menu screen activity from which i am able to start the androidharness activity to game. But as soon as game is over i want to start result activity from SimpleApplication class. Plzz help how to do this.







Thanks

Abhishek

Here are a couple of links on how to connect Android Specific code to the game.



http://hub.jmonkeyengine.org/groups/android/forum/topic/how-can-i-pass-on-the-custom-class-instance-from-adroidharness-to-simpleapplication/?topic_page=2&num=15#post-157404



https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:android



The basic idea is to create an interface in the main game that is implemented on the android side. In the main game, create the interface and create a variable of that interface type in SimpleApplication. Have MainActivity also implement that same interface and set the variable in SimpleApplication to the MainActivity. (ie. app.myvar = this;) This way, SimpleApplication has access to call methods in the interface which are implemented in MainActivity. You can then call an interface method to pass information or events back to the Android side to display the Android menus. If the game is played on the PC, the variable will still be null, if the game is played on Android, the variable will be set by MainActivity to the Android class instance.