Android Question Any Beeper Values for Events

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Has anyone come up with Beeper values for events.

Something for file saved ok.

Error data is invalid.

Something has happened in background?

Thanks in advanced

BobVal
 

mangojack

Expert
Licensed User
Longtime User
I just create or find small mp3's and play them using the media player library ...

B4X:
  Dim MP As MediaPlayer
   
   'play sound
   MP.Initialize
   MP.Load(File.DirAssets, "slide.mp3")
   MP.Play

unsure if there is another way

Cheers mj
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
YEs I understand that and that is what I have been using. I was just wondering if anyone had any good values for the Duration / Frequency that made nice sounding tones.

I have been using 500, 600 for an Error Alert but need something more pleasant sounding for an "OK, I got that" but haven't been able to come up with one.

Guess I will just write a program that I can type in a D/F and hear it and move on to the next, not to mention that I a lot on the deaf side so most things sound a like to me
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Well, I just found a problem with using the Alert beeper. When I MUTE my Samsung Galaxy Tab-3 and do something that causes me to do an Alert the sound still plays.

Do I need to check if the device is muted? I would have thought the .Beep would do this and not sound.

So maybe MP3's are the way to go (just wonder about the overhead for a little sound [Files, loading, playing]
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
I didn't mute in code, I muted using the device settings which is why I was surprised it did not mute because every other sound on the device is
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
I think you are missing what I am saying.

I am not trying to mute anything in my program.

What I did is in the device go into setup and mute the sounds. Now NOTHING on my device makes any noise.

But when I run my program the beep program is still causing the beep sounds. Now if I have turned off the sounds using the device settings how is this possible?

I will add an option to my program to not make any noise but shouldn't the device settings over-ride anything I am doing?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm afraid that you didn't understand me.

There are 7 different volume channels in Android. When you "mute" the sound in the settings menu, it is not clear which channels are actually muted.

This is why I told you to test it by muting the MUSIC channel programmatically.

Anyway, if you like to use the RING channel you can use this code:
B4X:
b.Initialize2(1000, 1000, b.VOLUME_RING)

This way the sound will be muted when the "phone" is muted.
 
Upvote 0
Top