Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.app.Activity;

import android.content.Intent;
import android.os.Bundle;

public class Main {
    public static void backResult(Activity sourceActivity, int resultCode) {
        backResult(sourceActivity, resultCode, null);
    }

    public static void backResult(Activity sourceActivity, int resultCode, Bundle bdl) {
        Intent intent = new Intent();
        if (bdl != null) {
            intent.putExtras(bdl);
        }
        sourceActivity.setResult(resultCode, intent);
    }
}