localnotificationsplugin
localnotificationsplugin copied to clipboard
Play sound when notification is received in iOS
Feature Request
There doesn't seem to be any option to play a sound when notification is received
Feature description:
Allow to specify that a sound should be played when notified, maybe even what sound to play
1+ for this. But to play sound for Android and iOS. Possible enable/disable argument.
Android:
When building the NotificationCompat.Builder
add: builder.SetSound(RingtoneManager.GetDefaultUri(RingtoneType.Notification));
iOS
For building UILocalNotification
add:
SoundName = UILocalNotification.DefaultSoundName
Or building UNMutableNotificationContent
add:
Sound = UNNotificationSound.Default
+1 for sounds & vibration.
@justintemplar you said: Android: When building the NotificationCompat.Builder add: builder.SetSound(RingtoneManager.GetDefaultUri(RingtoneType.Notification));
but where in this project NotificationCompat.Builder is builded? I can't see anywhere
@raul9410 here you have it
Here is a pull request that was submitted before the repository was moved to a separate repository: https://github.com/edsnider/xamarin.plugins/pull/33
Maybe someone can submit a new PR with the old PR as inspiration?
@edsnider @jamesmontemagno could you add sound?
@JensSchadron
@JensSchadron @edsnider