3

I have a muslim app that triggers local notifications with sounds for prayer times throughout the day. The sounds are limited to 30 seconds. I am searching for a workaround to play sound longer than that.

I found out I can use AVAudioSession to play audio even if the app is in background by turning on Background Modes (Audio, Airplay, and Picture in Picture) in Capabilities target tab and using background task to play the audio. However I want to play sound at a specific time by scheduling it. Among the workarounds I found are also setting continuous local notifications. However I came across an alarm app (Alarmy) that can play sound when local notification is received. How is that doable? Thank you in advance!

nazih bash
  • 31
  • 2
  • Did you ever figure out the notification part? I am trying to do the same thing but having a hard time figuring it out. In terms of timing, I am planning on using an API to get the prayer time so ya maybe you can look into that as well. Please do share if you figured out the longer sound part? please – ZaMy Apr 23 '20 at 06:25

0 Answers0