Android Question Set volume

Discussion in 'Android Questions' started by Nickelgrass, Jun 5, 2019.

  1. Nickelgrass

    Nickelgrass Active Member Licensed User

    Hello,
    I used Erels code from this link https://www.b4x.com/android/forum/threads/set-volume-error.92938/#post-588012
    The thing is that it does work.
    But I call the function from a PhoneEvent when some defined number calls. For the current phonecall it does not ring. Only for the next phonecall. As if the volume is turned up but the current phonecall does not notice this.
    I would like for certain numbers if they call to turn up the volume right away. What could case the situation? Do I need to play a sound programatically?
    Thanks
    Best regards
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Try to add Sleep(500) (play with the interval) before you change the volume. Maybe the phone app changes the volume as well.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice