Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.app.Activity;
import android.content.Intent;

public class Main {
    public static final String EXTRA_FORWARD_INTENT = "forwardIntent";

    public static boolean startForwardActivity(Activity activity) {
        try {
            Intent i = activity.getIntent().getParcelableExtra(EXTRA_FORWARD_INTENT);
            if (i != null) {
                activity.startActivityForResult(i, 0);
                return true;
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return false;
    }
}