Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.app.ActivityManager;

import android.content.Context;

public class Main {
    public static ActivityManager getActivityManager(Context context) {
        ActivityManager result = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
        if (result == null)
            throw new UnsupportedOperationException("Could not retrieve ActivityManager");
        return result;
    }
}