BGAudio 1.0

gorelshv

Member
Licensed User
Longtime User
A very simple library which sets the speaker volume to max.
Very useful for alarm apps.
Usage example:
B4X:
Dim Vol as BGMaxVol
Vol.SetMax
Thats it. Enjoy.
EDIT: this library is no longer needed since version 1.36 of Phone library.
 

Attachments

  • BGAudio.zip
    1.2 KB · Views: 378
Last edited:

latcc

Banned
I like this function/library. I don't see a similar function to this one in the phone library.

This seems to have a bug though. After sounding a beep every second (using a timer) for 28 seconds there is a silence (on my device for 18seconds) before beeping continues.
 

gorelshv

Member
Licensed User
Longtime User
Considering the simplicity of this library my guess is there is something wrong with your code. Without seeing your code, I can't tell if the library is buggy or not.
Anyway, as I wrote, this library is no longer needed. You can use the GetMaxVolume and SetVolume methods in the Phone library to achieve the same effect.
 

latcc

Banned
Considering the simplicity of this library my guess is there is something wrong with your code. Without seeing your code, I can't tell if the library is buggy or not.
Anyway, as I wrote, this library is no longer needed. You can use the GetMaxVolume and SetVolume methods in the Phone library to achieve the same effect.
It was not the library but Android, and the way the code was initialized. It must be initialized outside of the sub as a global or in activity_create. There is a limitation of about 28 instances of this beeper then Android gets touchy.
 
Top