I am building a prototype in Xamarin.Forms that sends a push notification to the same App installed on other devices. I'm using OneSignal libraries. Everything works perfectly. The push notification is sent by one device and received by the others correctly. Whether the App is in the foreground or in the background. When the push notification arrives on the other devices, I capture it in HandleNotificationReceived and call my service that plays the Ringtone sound. When push notification arrives on other devices and the app is in the foreground, everything works perfectly. However, when it arrives on the other devices, and the App is in the background, only Push Notification arrives, but the Ringtone sound does not play. I read about limitations when trying to run some things in Background and I believe my problem has something to do with it. can anybody help me? Here is my code:
Eu não consegui colocar meu código nessa pergunta, pois deu erro.
Vocês podem ver o código na pergunta que eu criei no stackoverflow antes de saber sobre este forum:
https://stackoverflow.com/questions/67732048/play-notification-sound-like-a-phone-call-ringtone-sound