2016-07-28 16 views
0

Ich habe zwei Klassen, eine, die sich von PApplet erstreckt, andere, die sich von Activity erstreckt. Ich wonna kommunizieren sich gegenseitig durch eine Intent. Wie mache ich das?Android - Wie bekomme ich eine Aktivität von einem PApplet

Beispiel:

//Class that extends PApplet. 
Intent intent = new Intent(this, Test.class); //Activity I wanna go to. 
startActivity(intent); 

Antwort

0
Intent intent = new Intent(this.getActivity(), Teste.class); 
    try { 
     this.finalize(); 
    } catch (Throwable throwable) { 
     throwable.printStackTrace(); 
    } 
    this.startActivity(intent);