How to access intent related variables in jMonkey AppStates?

Hi,

I want to access variables passed via android intents in jMonkey app. I can access these variables using the typical intent variable reading code in the MainActivity

[java] @Override
public void onCreate(Bundle savedInstanceState) {
//super.onCreate(savedInstanceState);
Bundle parameters = getIntent().getExtras();
System.out.println(“hurr”);
if (parameters != null) {
String name = parameters.getString(“myextra”);
System.out.println(name);
//Integer age = parameters.getInt(“age”);
}
}
[/java]

However I want to access these variables in the jMonkey AppStates but I don’t know how to pass references of the object holding these variables to jMonkey system. I can’t access AppStateManager from the MainActivity and I can’t access JmeAndroidSystem reference from the AppState using the JmeSystem object.

Is there a good way of this communication instead of hacking the AndroidHarness and JmeSystem code to make the JmeAndroidSystem visible.

@simar.i3r said: I can't access AppStateManager from the MainActivity
[java]app.getStateManager()?[/java]

Doing it this way around is backwards, you should not make the whole application depend on one deployment system, check out the manual on this topic:
https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:android#using_android_specific_functions