System sound and vibration should first be introduced into the system library: Audiotoolbox.framework
References: #import <AudioToolbox/AudioToolbox.h>
1. Call Vibration:
Audioservicesplaysystemsound (ksystemsoundid_vibrate);
2, call system sound
A. Call directly
Audioservicesplaysystemsound (1007);//The sound is similar to the voice of QQ
B. Calling more system sounds
systemsoundid sound; NSString *soundname = @ " sms-received3 " ; NSString *soundtype = @ " CAF " ; NSString *path = [nsstring stringwithformat:@ " /system/library/audio/uisounds/%@.%@ " ,soundname,soundtype]; Osstatus Error = Audioservicescreatesystemsoundid ((__bridge cfurlref) [Nsurl Fileurlwithpath:path],&sound); if (!
The Soundname and Soundtype correspond to the following data, the type is the suffix
Information
receivedmessage.caf--receives information and plays only when the SMS interface is open.
SMS-RECEIVED1.CAF-------Three Tone
SMS-RECEIVED2.CAF-------Jungzhongchen
SMS-RECEIVED3.CAF-------Glass
SMS-RECEIVED4.CAF-------Horn
SMS-RECEIVED5.CAF-------Ringtones
SMS-RECEIVED6.CAF-------Electronic Music
SENTMESSAGE.CAF--------Send a message
Mail
MAIL-SENT.CAF----Send mail
NEW-MAIL.CAF-----Receive new mail
Phone
DTMF-0.CAF----------Dial Panel 0 button
DTMF-1.CAF----------Dial Panel 1 button
DTMF-2.CAF----------Dial Panel 2 button
DTMF-3.CAF----------Dial Panel 3 button
DTMF-4.CAF----------Dial Panel 4 button
DTMF-5.CAF----------Dial Panel 5 button
DTMF-6.CAF----------Dial Panel 6 button
DTMF-7.CAF----------Dial Panel 7 button
DTMF-8.CAF----------Dial Panel 8 button
DTMF-9.CAF----------Dial Panel 9 button
DTMF-POUND.CAF---dial panel # keys
DTMF-STAR.CAF------Dial Panel * keys
VOICEMAIL.CAF-----New Voice mail
Input Device Sound Tips
TOCK.CAF-----------------------Click on the keyboard
BEGIN_RECORD.CAF-----------start Recording.
begin_video_record.caf--start recording.
PHOTOSHUTTER.CAF------------Shutter Sound
END_RECORD.CAF--------------End Recording
END_VIDEO_RECORD.CAF-----End Video
Other
beep-beep.caf--charge, logout and connect the computer &NBSP;
LOCK.CAF------------lock phone
SHAKE.CAF---------"This is not clear"
UNLOCK.CAF--------slide to unlock
low_ power.caf--Low Battery tip
Voice control
jbl_ambiguous.caf--found multiple matches
JBL_BEGIN.CAF------Waiting for the user's input
JBL_CANCEL.CAF-----Cancel
JBL_CONFIRM.CAF----Execution
JBL_NO_MATCH.CAF---No match found
Calendar
alarm.caf--Calendar Reminders
IPod Touch 1G
Sq_alarm.caf
Sq_beep-beep.caf
Sq_lock.caf
Sq_tock.caf
iOS calls system sounds and vibrations