Java tutorial
//package com.java2s; import android.app.Activity; import android.content.Context; import android.content.Intent; public class Main { public static void jumpToActivityForResult(Context context, Class<? extends Activity> targetClass, int resultId, String... datas) { Intent datatIntent = new Intent(context, targetClass); if (datas != null) { for (int i = 0; i < datas.length; ++i) { datatIntent.putExtra("data" + i, datas[i]); } } ((Activity) context).startActivityForResult(datatIntent, resultId); } public static void jumpToActivityForResult(Context context, Class<? extends Activity> targetClass, int resultId) { Intent datatIntent = new Intent(context, targetClass); ((Activity) context).startActivityForResult(datatIntent, resultId); } }