Volume bug with Android ?

Hello guys,

I have a kind of issue on my phone with any corona apps or maybe it’s just a normal behavior : when I try to adjust the sound with side buttons (+ and -), I have to press several times in order to reach the volume that I want ; just holding it doesn’t work.

Is that fixable ?

Thanks, and my apologize for any grammar mistakes.

Do you have a key event listener in your app/game and is it returning values?  You may be hijacking the volume input.

Yes, here is the only one key event listener that I have but it concerns the “back” button.

Runtime:addEventListener(‘key’, function(event)

if event.phase == ‘down’ and event.keyName == ‘back’ then

local scene = composer.getScene(composer.getSceneName(‘current’))

            if scene then

                 if type(scene.gotoPreviousScene) == ‘function’ then

                      scene:gotoPreviousScene()

                      return true

            elseif type(scene.gotoPreviousScene) == ‘string’ then

                 composer.gotoScene(scene.gotoPreviousScene, {time = 500, effect = ‘slideRight’})

                 return true

            end

       end

end

end)

Even before that I add this event, it didn’t work. This is why I think that I may have to add some instructions.

Right.  Holding down the volume button will only increment/decrement the volume 1 step in a Corona made app.
This is unfortunately a Corona limitation and there’s an internal technical reason for it that we don’t plan on resolving.

Fine, thank you. That’s not a big problem so it’s okay.

Do you have a key event listener in your app/game and is it returning values?  You may be hijacking the volume input.

Yes, here is the only one key event listener that I have but it concerns the “back” button.

Runtime:addEventListener(‘key’, function(event)

if event.phase == ‘down’ and event.keyName == ‘back’ then

local scene = composer.getScene(composer.getSceneName(‘current’))

            if scene then

                 if type(scene.gotoPreviousScene) == ‘function’ then

                      scene:gotoPreviousScene()

                      return true

            elseif type(scene.gotoPreviousScene) == ‘string’ then

                 composer.gotoScene(scene.gotoPreviousScene, {time = 500, effect = ‘slideRight’})

                 return true

            end

       end

end

end)

Even before that I add this event, it didn’t work. This is why I think that I may have to add some instructions.

Right.  Holding down the volume button will only increment/decrement the volume 1 step in a Corona made app.
This is unfortunately a Corona limitation and there’s an internal technical reason for it that we don’t plan on resolving.

Fine, thank you. That’s not a big problem so it’s okay.