How do I detect volume up/down presses on mobile?

Just started using Construct 2? Post your questions here

Post » Sun Mar 13, 2016 11:10 am

Hello,

Is there a way I could detect if a player has pressed the volume up or down button on a mobile phone? I am starting a project where I'd like the player to control the character using these two buttons. Would be great if it won't affect the mobile sounds/music volume level.

Any help would be appreciated, thank you very much in advance.
B
19
S
7
Posts: 161
Reputation: 1,751

Post » Wed Mar 16, 2016 11:04 am

Bump! Anyone knows if this is at all possible in Construct 2 or perhaps an easy work around for it?

Thanks a lot!
B
19
S
7
Posts: 161
Reputation: 1,751

Post » Wed Mar 16, 2016 11:20 am

I don't think it's possible. Even if it was possible, you won't be able to control the game without constantly changing the volume.

PS: Controlling the game with volume buttons is not a good idea.
B
14
S
2
Posts: 35
Reputation: 789

Post » Wed Mar 16, 2016 11:54 am

I don't think it's possible by any means: device makers want the buttons to always work, and not be taken over by malicious (or otherwise) apps. Most users want to avoid situations like getting a loud ringtone at an inappropriate time, then finding the volume buttons don't work...
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560

Post » Wed Mar 16, 2016 5:47 pm

Ah, I see. Shame! I am supervising a few grade 7 students and they wanted to make an app that teaches blind kids math, science, English, etc...

Touching or taping the screen isn't as ideal or as effective as a physical button. They'll have to find another way :).

Thanks a lot for your assistance guys :)
B
19
S
7
Posts: 161
Reputation: 1,751


Return to Beginner's Questions

Who is online

Users browsing this forum: gyurto and 2 guests