Java tutorial
//package com.java2s; //License from project: Open Source License import android.app.Activity; import android.content.Intent; import android.os.Bundle; public class Main { public static void goToForResult(Activity aty, Class clazz, Bundle bundle, int requestCode) { Intent intent = new Intent(aty, clazz); if (bundle != null) { intent.putExtras(bundle); } aty.startActivityForResult(intent, requestCode); } public static void goToForResult(Activity aty, Class clazz, int requestCode) { goToForResult(aty, clazz, null, requestCode); } }