Android中自定义通知声音
Android 自定义Notificiation sound 步骤
- 在res新建raw目录,将音频文件拷贝到该目录下.
eg: 文件名为sound.wav 获取Uri
1234String filePath = "android.resource://"+ getPackageName() + "/raw/sound"Uri sound = Uri.parse(respath);notificiation.setSound(sound)
<<<<<<< HEAD:2015/12/22/Android中自定义通知声音/index.html注意 : filePath的文件名称不带后缀(亲测)