Java tutorial
//package com.java2s; //License from project: Apache License import android.app.Activity; import android.content.Intent; import android.os.Bundle; public class Main { public static void jumpForResult(Activity sourceActivity, Class<?> targetActivity, int requestCode) { jumpForResult(sourceActivity, targetActivity, requestCode, null); } public static void jumpForResult(Activity sourceActivity, Class<?> targetActivity, int requestCode, Bundle bdl) { Intent intent = new Intent(sourceActivity, targetActivity); if (bdl != null) { intent.putExtras(bdl); } sourceActivity.startActivityForResult(intent, requestCode); } }