Sub Activity_KeyPress (KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_VOLUME_DOWN Then
If p.GetVolume(p.VOLUME_SYSTEM) > 0 Then
p.SetVolume(p.VOLUME_SYSTEM, p.GetVolume(p.VOLUME_SYSTEM) - 1, False)
End If
End If
If KeyCode = KeyCodes.KEYCODE_VOLUME_UP Then
If p.GetVolume(p.VOLUME_SYSTEM) < p.GetMaxVolume(p.VOLUME_SYSTEM) Then
p.SetVolume(p.VOLUME_SYSTEM, p.GetVolume(p.VOLUME_SYSTEM) + 1, False)
End If
End If
End Sub