Slider volume question (edited)

Hi Tom. I am using 1161

Cheers

Rob

@Rob, can you verify with build 1137?

Hey, Tom, I think Rob @BeatsnBobs does not have the device with which he could verify this (or at least that’s what it sounds like to me from his first post.)  So, I’m on it.  I’m downloading the 1137 now and will post back.

Naomi

I just need to finish a couple of things Im working on then will do a test with that version

Yikes, the super quick test I did was totally wrong.  I’m so sorry about the false alert.  onKeyEvent for volume works fine on both 1137 and 1170, so long as we include return false to the key event.  It enables the OS volume slider to appear, and it gets the volume to go up and down properly.  I tested this on Galaxy S3 and Nexus 7.

I looked at my code, and I see the issue now.  When I did the quick test, I first tested without return false, which made the volumeUp and volumeDown to fail.  I then tested with return false, but I ended up having return false in volumeDown event only. 

And with Nexus 10, I have no clue at this point why it worked.  Maybe in my haste, I didn’t install the test app at all.  Ugh.

Again, Tom, I apologize for taking your time on this.

Naomi

Edit:  BTW, I haven’t tested how it behaves with return true.  Since it’s working with return false, I’m not going to worry about it.

Naomi: You quickly stuck it below the wrong “end” I guess. Easy to do. :slight_smile:

Tom: My original question was asking why whether or not the volume slider graphics come up or not the volume still works.  Also when I went back to an older app from a few months ago without any of that android key code, the volume worked anyway together with the graphics as normal. So by me putting the code in didnt seem to make any difference. What is happening if the graphics do not appear? Is this controlling the apps volume and not the system volume?

Do you still need me to do a test now that the major things Naomi mentioned are okay now?

Hey, BeatsnBobs, I don’t think volumeUp or volumeDown would work without OS volume slider.  

At least that’s how it looks to me when I tested it.  Also, with my app, when I do not include key code for volume, I cannot up or down the volume from within the app.  Plus, return true will also cause the code not to work.  I didn’t look carefully at what I was doing with key code earlier, but the thing is, my key code returns true by default.  So when I didn’t add any to volume key event, it was returning true.

I don’t understand why the volume works without android key code with your older app.  What daily build did you use with the app that works that way?

Naomi