简单播放系统提示音 android

  1. //Uri alert = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);  
  2. //alert = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);  
  3. //alert = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);  
  4.                           
  5.   
  6.   
  7.   
  8.     Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);  
  9.                     Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), notification);  
  10.                     r.play();   

posted on 2014-02-24 14:10  cn三少<script></script>  阅读(2393)  评论(0编辑  收藏  举报

导航