Example usage for android.app Activity RESULT_OK

List of usage examples for android.app Activity RESULT_OK

Introduction

In this page you can find the example usage for android.app Activity RESULT_OK.

Prototype

int RESULT_OK

To view the source code for android.app Activity RESULT_OK.

Click Source Link

Document

Standard activity result: operation succeeded.

Usage

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

private static void finishActivity(Activity activity) {
    activity.setResult(Activity.RESULT_OK, new Intent());
    activity.finish();
}

From source file:Main.java

private static void closeActivity(Activity activity) {
    Intent intent = activity.getIntent();
    activity.setResult(Activity.RESULT_OK, intent);
    activity.finish();
}

From source file:Main.java

public static boolean isOkAndOpen(int requestCode, int resultCode) {
    return requestCode == REQUEST_CODE_OPEN && resultCode == Activity.RESULT_OK;
}

From source file:Main.java

public static final boolean isCameraResult(final Activity context, int requestCode, int resultCode) {
    return resultCode == Activity.RESULT_OK && requestCode == CAMERA_PIC_REQUEST;

}

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();
}

From source file:Main.java

public static void back(Context old, Intent intent) {
    Activity activity = (Activity) old;
    activity.finish();
    activity.setResult(Activity.RESULT_OK, intent);
}

From source file:Main.java

public static boolean isOkRingtoneResult(int requestCode, int resultCode) {
    return requestCode == RINGTONE_REQUESTCODE && resultCode == Activity.RESULT_OK;
}

From source file:Main.java

public static Intent returnIntent_WithObject(Activity activity, Bundle bundle) {
    Intent returnIntent = new Intent();
    returnIntent.putExtras(bundle);/*from ww w. j a va 2s  . c  o m*/
    activity.setResult(Activity.RESULT_OK, returnIntent);
    return returnIntent;
}

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);
}