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

简单播放系统提示音 android的更多相关文章

  1. ios系统提示音的使用(不是铃声)

    AudioServices Jump to: navigation, search AudioServices is a group of C functions in AudioToolbox fo ...

  2. 播放WAV文件和系统提示音

  3. android开发(44) 使用了 SoundPool 播放提示音

    SoundPool 一个声音播放的辅助类,从名字可以看出,它具有 “池”的能力,它先加载声音文件到内存,以支持多次播放声音文件. 特点 SoundPool适合 短小的 声音文件 SoundPool适合 ...

  4. SoundPool 播放提示音

    SoundPool 一个声音播放的辅助类,从名字可以看出,它具有 “池”的能力,它先加载声音文件到内存,以支持多次播放声音文件. 特点 SoundPool适合 短小的 声音文件 SoundPool适合 ...

  5. 背水一战 Windows 10 (107) - 通知(Toast): 提示音, 特定场景

    [源码下载] 背水一战 Windows 10 (107) - 通知(Toast): 提示音, 特定场景 作者:webabcd 介绍背水一战 Windows 10 之 通知(Toast) 提示音 特定场 ...

  6. Android笔记: 播放提示音 的简单方法

    public static void sendSound(Context mContext) { //上下文 Uri mUri= RingtoneManager.getDefaultUri(Ringt ...

  7. ios开发小技巧之提示音播放与震动

    在ios开发中,有时候我们需要频繁播放某种提示声音,比如微博刷新提示音.QQ消息提示音等,对于这些短小且需要频繁播放的音频,最好将其加入到系统声音(system sound)里. 注意: 需要播放的音 ...

  8. 【转】Android中通知的提示音、震动和LED灯效果小例子

    通知(Notification)是 Android 系统中比较有特色的一个功能,当某个应用程序希望向用户发出一些提示信息,而该应用程序又不在前台运行时,就可以借助通知来实现.发出一条通知后,手机最上方 ...

  9. iOS 提示音播放

    首先找到对应的素材 音频文件 写一个类继承 NSObject 命名为AudioUtil 导入支撑文件 #import <AVFoundation/AVFoundation.h> #impo ...

随机推荐

  1. CSS引入方式的区别详解

    在web前端开发中,CSS是一种用来表现HTML或XML等文件样式的语言.很多处于web前端初学阶段的朋友,很多人都不知道CSS引入方式存在三种方法,css引入方式分别为标签内联书写.页面头部书写.外 ...

  2. About View

    View Geometry Frame & Bounds Graphically, a view can be regarded as a framed canvas. The frame l ...

  3. form表单验证2

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  4. C#基础--面向过程计算器

    //面向过程计算器 //思路: 需要注意的是: 两个数相除 除数不能为0: //1.提示用户输入 //2.进行运算 //3.得到结果 Console.WriteLine("请输入第一个数字: ...

  5. operation not possible due to RF-kill

    使用mdk3时出现这个问题operation not possible due to RF-kill 就是输入第一条命令 后出现 operation not possible due to RF-ki ...

  6. TCP同步传送数据示例以及可能出现问题分析

    TCP传送数据可以分为同步传送和异步传送,首先这里使用了TCP的同步传送方式,学习了TCP同步传送数据的原理. 同步工作方式是指利用TCP编写的程序执行到监听或者接受数据语句的时候,在未完成当前工作( ...

  7. catch的执行与try的匹配

    这里有一段代码: public class EmbededFinally { public static void main(String args[]) { int result; try { Sy ...

  8. Note_Master-Detail Application(iOS template)_05_ YJYMasterViewController.m

    //  YJYMasterViewController.m #import "YJYMasterViewController.h" #import "YJYDetailV ...

  9. 2016 - 1- 14 UI阶段学习补充 transform属性详解

    UIView的transform属性 transform是view的一个重要属性,它在矩阵层面上改变view的显⽰状态,能实现view的缩放.旋转.平移等功能.transform是CGAffineTr ...

  10. Android Material Design : Ripple Effect水波波纹荡漾的视觉交互设计

     Android Material Design : Ripple Effect水波波纹荡漾的视觉交互设计 Android Ripple Effect波纹荡漾效果,是Android Materia ...