Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

public class Main {
    public static void openActivity(Context context, Class<?> clazz, Bundle... bundles) {
        Intent intent = new Intent(context, clazz);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        if (bundles != null && bundles.length > 0) {
            intent.putExtras(bundles[0]);
        }
        context.startActivity(intent);
    }
}