How to do this?

Tried to do with the help of Intent, but gives an error saying that it is not used here. What do you advise?

    1 answer 1

    It can not be this ... Most likely you are SurfaceView something and trying to take Context simple caste from SurfaceView (as from Activiti). It is necessary to do this:

     Context context = getContext(); Intent intent = new Intent(context, MyActivity.class); //а не new Intent(this, MyActivity.class) context.startActivity(intent); 
    • Everything is simple, thanks a lot! - dajver