Java tutorial
//package com.java2s; import android.app.Activity; import android.content.Intent; public class Main { public static void finishActivityWithSetting(Activity paramActivity, String paramString1, String paramString2) { if (paramString1 != null) { Intent localIntent = new Intent(); localIntent.putExtra("setting_raw", paramString1); localIntent.putExtra("setting_label", paramString2); paramActivity.setResult(-1, localIntent); } paramActivity.finish(); } }