Hello comunity
I’ve got an urgent problem
I have to start a none JME3 activity out of JME3 Engine.
can anyone help me with this? any ideas will be helpful
iam working in eclipse, so i thought it shouldn’t be a problem to start an activity out of JME3 but it is.
the normal way in android as far as i know(as i did) is generating an intent and use startActivity
[java]
//example starts an other activity in eclipse
Intent intent1 = new Intent(this, com.example.Interferenz.InterferenzActivity.class);
intent1.putExtra(“objekt”,(byte)1);
startActivity(intent1);
[/java]
I tried in simpleapplication: doesnt work
[java]
@Override
public void simpleUpdate(float tpf) {
time+=tpf;
if (time>=3){
checkPosition();
time=0;
System.out.println(object1.distanceSquared(myPlayer.getWorldTranslation()));
}
if(!gameStarted){
if (object1.distanceSquared(myPlayer.getWorldTranslation())<=100f){
System.out.println(“YES!”);
gameStarted=!gameStarted;
Intent intent1 = new Intent(this, com.example.Interferenz.InterferenzActivity.class);
intent1.putExtra(“objekt”,(byte)1);
startActivity(intent1);
}
}
}
[/java]
I tried in oncreate: doesnt work
[java]
package com.example.game;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.Menu;
import com.jme3.app.AndroidHarness;
public class GameActivity extends AndroidHarness {
public GameActivity () {
appClass = com.example.game.Game.class.getName();
screenOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent1 = new Intent(this, com.example.Interferenz.InterferenzActivity.class);
intent1.putExtra("objekt",(byte)1);
startActivity(intent1);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
}
[/java]
I think i read the whole forum to find anything about this
I am really lost at the moment