Java tutorial
//package com.java2s; import android.content.Context; import android.content.Intent; import android.os.Bundle; public class Main { public static Intent gotoIntent_WithString(Context context, Class c, String accessName, String value) { Bundle bundle = new Bundle(); bundle.putString(accessName, value); Intent intent = new Intent(); intent.setClass(context, c); //intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.putExtras(bundle); return intent; } }