Here you can find the source of to(Context context, Class> cls)
public static final void to(Context context, Class<?> cls)
//package com.java2s; import android.content.Context; import android.content.Intent; import android.os.Bundle; public class Main { public static final void to(Context context, Class<?> cls) { to(context, cls, null);// www . ja v a 2 s . c o m } public static final void to(Context context, Class<?> cls, Bundle data) { Intent intent = new Intent(context, cls); if (data != null) { intent.putExtras(data); } context.startActivity(intent); } }