How to make phone play a custom sound after pressing physical button?
OK, I found an answer by myself :-) To add action to volume button I used Key Plus app (https://play.google.com/store/apps/details?id=com.apptuners.keyplusapp). Then I created a task with Tasker (https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm&amp;hl=pl) which set media volume to max, play a sound, wait till it ends and revert volume to previous value: