B4X FEED How to play sounds in ALARM audio channel

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن practicalsoftمی باشد و موضوع آن: How to play sounds in ALARM audio channel است. این موضوع تا کنون 113 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع How to play sounds in ALARM audio channel
آغاز کننده موضوع practicalsoft
تاریخ شروع
پاسخ‌ها
0
بازدیدها
113
پسندها
0
آخرین ارسال توسط PracticalSoft
وضعیت
موضوع بسته شده است و نمی‌توان پاسخ جدیدی فرستاد.
Jun 6, 2020
11,517
4,383
Hi

I'm trying to play an audio alarm when the phone is locked to alert the user.

I have been using the SoundPool.Play method, but this plays by via the Music / media channel which the user typically has turned down on their device.
I've adjusted the Play volume in the PLAY call, but the volume is a still prodeminatly controlled by the users media volumn setting.

So now I'm looking to play the alert via the ALARM channel as I'm hoping that the volume on that will not be adjusted by the user as often.

I notice on the android documentation that the SoundPool initializer can take a few paramenters. One of them is the channel to play on - such as the ALARM channel.
In B4A it looks like we can only initialize the soundpool on the default Music / Media channel.

Do you know if it is possible to play audio filles via the ALARM channel ? Is there a way to set the soundpool to use the prefered channel ?

Thanks
Alan

 

وضعیت
موضوع بسته شده است و نمی‌توان پاسخ جدیدی فرستاد.
عقب
بالا