0

I want to set a music which is longer than 30sec as notification soound. But after searching about this I came to know that it is not possible to add these type of music as notification sound. notification sound must be in 30sec longer otherwise it will not play music. Now how can I add more than 30sec longer music as notification sound?

sazid008
  • 175
  • 2
  • 14

1 Answers1

0

I had a similar issue for my alarm app as well. What I did was a workaround when your app is in background. You play a music file in your code in background and increase the volume of the device to maximum. You can play as much longer music file as you want. Stop playing the music when someone clicks on the notification.

The only problem with this is that your app should not be killed or terminated.

Swati
  • 1,417
  • 1
  • 15
  • 35