I am developing a small libgdx game. I want to call an Activity class from AndroidApplication class. I used the following code
context.startActivity(new Intent(MyClass.this,NewActivity.class));
Thanks in advance
I am developing a small libgdx game. I want to call an Activity class from AndroidApplication class. I used the following code
context.startActivity(new Intent(MyClass.this,NewActivity.class));
Thanks in advance
Use this:
Intent i = new Intent(MainActivity.this, NewActivity.class);
startActivity(i);
Try one of the code-
Intent i = new Intent(MyClass.this, NewActivity.class);
startActivity(i);
Or
Intent i= new Intent(getBaseContext(), NewActivity.class);
startActivity(i);
Or
startActivity(new Intent(MyClass.this, NewActivity.class));
Use like this
Intent i=new Intent(MyClass.this,NewActivity.class);
startActivity(i);