当前位置: 动力学知识库 > 问答 > 编程问答 >

android - How to set notification sound resource file path into Preference and retrieve it

问题描述:

Below is the way to set notification sound in Android

 Uri sound = Uri.parse("android.resource://" + context.getPackageName() + "/" + R.raw.notifysnd);

b.setSound(sound);

Now that I have my SDK which does not include "Resource Files". I will be setting sound from SAMPLE APP and the same I will be retrieving in SDK. Is there any way to do this using Preferences? Can I set "notification sound" from a resource file in sample app into preference and retrieve the same in SDK and actually set there?

分享给朋友:
您可能感兴趣的文章:
随机阅读: