Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
// Released under the Apache License, Version 2.0

import android.app.Activity;
import android.content.Context;
import android.media.AudioManager;

public class Main {
    /**
     * Utility method that returns and AudioManager for the Activity passed in
     * @param activity the Activity that will be associated to the AudioManager
     * @return the AudioManager object for the passed Activity
     */
    public static AudioManager setAudioManager(Activity activity) {
        return (AudioManager) activity.getSystemService(Context.AUDIO_SERVICE);
    }
}