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. EF 学习笔记

    1.EFcodeFirst如何使用存储过程!public string GetCoupon(int type) { using (var db=new ProbabilityContext()) { ...

  2. android application plugins framework

    android插件式开发 android application plugins framework http://code.google.com/p/android-application-plug ...

  3. hdu 2089

    PS:额...暴力打表...今天学到的新名词..记得把数组开到100W.. 代码: #include "stdio.h" ]; int cal(int a); int main() ...

  4. vijos 1741 观光公交

    TMD这种题有什么意思啊...敲着都烦啊...感觉啥都没有用就敲完了...光考个贪心有什么意思啊. 反正不想写.NOIP遇到了...管他呢. #include<iostream> #inc ...

  5. BZOJ 1034 泡泡堂

    贪心可过.原来浙江省选也不是那么难嘛.. 作者懒,粘的题解.此题类似于田忌赛马的策略,只要站在浙江队一方和站在对手一方进行考虑即可. #include<iostream>#include& ...

  6. Android获取图片资源的4种方式

    1. 图片放在sdcard中 Bitmap imageBitmap = BitmapFactory.decodeFile(path) (path 是图片的路径,跟目录是/sdcard) 2. 图片在项 ...

  7. CentOS 7.0禁用iptables防火墙

    CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. firewall: systemctl start firewalld.service#启动firewal ...

  8. Newspaper Headline_set(upper_bound)

    Description A newspaper is published in Walrusland. Its heading is s1, it consists of lowercase Lati ...

  9. CODEVS1380 没有上司的舞会 (树形DP)

    f[i,0] 表示 第i个人不参加舞会 f[i,1] 表示 第i个人参加舞会 f[i,1]=sigma(f[j,0])+v[i]   j 为 i 的孩子 f[i,1]=sigma(max(f[j,0] ...

  10. 一个自定义的窗体样式MessageBox控件

    using System;using System.Collections.Generic;using System.Text;using System.Drawing;using System.Dr ...