is Audio On Pause - Android Media

Android examples for Media:Auto Player

Description

is Audio On Pause

Demo Code


//package com.java2s;
import android.content.Context;
import android.media.AudioManager;

public class Main {
    public static boolean isOnPause(Context ctx) {
        AudioManager am = (AudioManager) ctx
                .getSystemService(Context.AUDIO_SERVICE);
        return am.getMode() != AudioManager.MODE_NORMAL;
    }//  w w  w  .j a va 2s  .co  m
}

Related Tutorials