iphone - alrm sound not works -


i want set alrms use code.

uilocalnotification *localnotif = [[uilocalnotification alloc] init];     if (localnotif == nil)         return;     localnotif.firedate = itemdate;     localnotif.timezone = [nstimezone defaulttimezone];      localnotif.alertbody = @"appointment";      localnotif.alertaction = @"view";      //localnotif.soundname = uilocalnotificationdefaultsoundname;     localnotif.soundname = @"iphone_alarm.mp3";     //localnotif.soundname=@"sound.mp3";     localnotif.applicationiconbadgenumber = 1;      [[uiapplication sharedapplication] schedulelocalnotification:localnotif];     [localnotif release]; 

it shows alerts not play sound, sound name having correct case , spell.on device not having vibration.

try defining full path mp3 file:

localnotif.soundname = [[nsbundle mainbundle] pathforresource:@"iphone_alarm" oftype:@"mp3"]; 

not sure vibration though.


Comments

Popular posts from this blog

Delphi Wmi Query on a Remote Machine -