Package 

Class BeepManager

  • All Implemented Interfaces:
    android.media.MediaPlayer.OnErrorListener , java.io.Closeable , java.lang.AutoCloseable

    
    public final class BeepManager
     implements MediaPlayer.OnErrorListener, Closeable
                        

    音效管理器:主要用于播放蜂鸣提示音和振动效果

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean playBeep
      private boolean vibrate
    • Constructor Summary

      Constructors 
      Constructor Description
      BeepManager(Context context)
    • Method Summary

      Modifier and Type Method Description
      void setPlayBeep(boolean playBeep)
      void setVibrate(boolean vibrate)
      synchronized void playBeepSoundAndVibrate()
      synchronized boolean onError(MediaPlayer mp, int what, int extra)
      synchronized void close()
      • Methods inherited from class android.media.MediaPlayer.OnErrorListener

        onError
      • Methods inherited from class java.io.Closeable

        close
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BeepManager

        BeepManager(Context context)