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.Context;

import android.content.Intent;

import android.os.Bundle;

public class Main {
    public static void startWirelessSetting(Activity activity) {
        activity.startActivity(new Intent("android.settings.WIRELESS_SETTINGS"));
    }

    public static void startActivity(Context context, Class class1) {
        context.startActivity(new Intent(context, class1));
    }

    public static void startActivity(Context context, Class class1, Bundle bundle) {
        Intent intent = new Intent(context, class1);
        intent.putExtras(bundle);
        context.startActivity(intent);
    }
}