List of usage examples for android.app Activity setResult
public final void setResult(int resultCode, Intent data)
From source file:Main.java
private static void finishActivity(Activity activity) { activity.setResult(Activity.RESULT_OK, new Intent()); activity.finish();/*from w w w .j ava 2 s. c o m*/ }
From source file:Main.java
public static void Finish(Activity activity, Intent data) { activity.setResult(Activity.RESULT_OK, data); activity.finish(); }
From source file:Main.java
public static void back(Context old, Intent intent) { Activity activity = (Activity) old; activity.setResult(Activity.RESULT_OK, intent); activity.finish();/* ww w .j a v a 2 s. c om*/ }
From source file:Main.java
public static void back(Context old, Intent intent) { Activity activity = (Activity) old; activity.finish();// w w w .j a v a 2 s.c o m activity.setResult(Activity.RESULT_OK, intent); }
From source file:Main.java
private static void closeActivity(Activity activity) { Intent intent = activity.getIntent(); activity.setResult(Activity.RESULT_OK, intent); activity.finish();/* w w w. j a v a 2 s .co m*/ }
From source file:Main.java
public static Intent returnIntent_WithObject(Activity activity, Bundle bundle) { Intent returnIntent = new Intent(); returnIntent.putExtras(bundle);//from w ww.j a v a 2 s . c o m activity.setResult(Activity.RESULT_OK, returnIntent); return returnIntent; }
From source file:Main.java
public static void onActivityResult(Activity activity, Intent data) { if (data != null) { Intent i = activity.getIntent(); i.putExtra(EXTRA_FORWARD_INTENT, data); activity.setResult(0, i); }/* ww w . j ava 2 s.c om*/ }
From source file:Main.java
public static void backResult(Activity sourceActivity, int resultCode, Bundle bdl) { Intent intent = new Intent(); if (bdl != null) { intent.putExtras(bdl);// www . j a v a2 s . c om } sourceActivity.setResult(resultCode, intent); }
From source file:Main.java
public static void storeCtsTestResult(Activity activity, float reportedFOV, float measuredFOV) { Intent it = new Intent(); it.putExtra(REPORTED_FOV_EXTRA, reportedFOV); it.putExtra(MEASURED_FOV_EXTRA, measuredFOV); activity.setResult(Activity.RESULT_OK, it); }
From source file:Main.java
public static void resultSetParameter(Activity context, int resultCode, String extraName, int extraValue) { Intent intent = new Intent(); intent.putExtra(extraName, extraValue); context.setResult(resultCode, intent); }