How to open a new Intent inside OnTouch Event?

丶灬走出姿态 提交于 2019-12-01 01:49:00
Luke Taylor

Fist of all, when you log, you don't use System.out.println(");. For logging in Android one uses the Log class, so you can simply log like this: Log.d("className", "This is a test");

This might resolve your problem The method startActivity(Intent) is undefined for the type?

I hope this helps.

I found the answer :)

private void startActivity() {
    // TODO Auto-generated method stub
    Intent myIntent = new Intent("android.intent.action.DetectBlock");
    myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    getContext().startActivity(myIntent);
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!