views:

48

answers:

1

When Notification receive os show an alert , is it possible to play sound instead of this alert? and when notification receive os add a red circle on the top of app's icon , is it possible to disable it(means not show this red circle)?

+2  A: 

YES, we can play a sound

localNotification.soundName = @"music.caf";

don't set the applicationIconBadgeNumber,alertBody,alertAction property of the localNotification.

All the best.

Warrior
and how to hide alert and red circle that os show when notification receive ?
i use this code but doesn't work code: NSURL* musicFile1 = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"01" ofType:@"WAV"]]; NSString *str=[[NSString alloc]initWithFormat:@"%@",musicFile1];localNotification.soundName =str;
type of music file must be .caf
Warrior
Thank you so much,just one problem hide red circle
there should be applicationIconBadgeNumber declared, don,t use it.comment and try. just now i checked its working fine.
Warrior
See the sample code i have given for your previous post.
Warrior
can you help me , i want to know how to send localNotification
GhostRider
@Ghost rider: see this answer http://stackoverflow.com/questions/3924365/local-notification ,it has sample code too.
Warrior
@Ghost rider --> are you working in A1 tech, mohali..?
Warrior
Thanx Me not working but i will try after few months
GhostRider
Thanks for source code and reply have you work on select video , when i try to select it start compressing
GhostRider
sorry no idea..
Warrior