我想知道是否有办法检索用户的铃声或声音。我对他们的音乐播放列表不感兴趣,但喜欢可以用于 uilocalnotifications 的 30 秒音频剪辑。有谁知道如何做到这一点?谢谢!
最佳答案
请参阅此答案。 how to get the system ringtones programmingly in ios?
如果您仍想触发音频通知,这 article应该让你开始。
您似乎可以为 soundName 属性分配一个文件名,或者为(我猜是)用户选择的通知声音传递 UILocalNotificationDefaultSoundName
。
- (void)scheduleNotificationWithItem:(ToDoItem *)item interval:(int)minutesBefore {
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
localNotif.soundName = UILocalNotificationDefaultSoundName;
...
[localNotif release];
}
关于objective-c - 检索用户铃声库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11462571/