Listening to the hardware media keys in a WebWorks application is a cool ability that I didn’t know how to make happen until fairly recently. Through the work of students in the program over the last couple terms, we’ve been able to build on the capabilities of the QtBridge plugin, to better understand how to get access to Qt Signals and Slots in WebWorks plugins. There’s still work to be done to make the programming task easier, but the path is a lot clearer than it once was. As part of the UCOSP program, Thomas from the University of Alberta worked on this plugin. Here is his account of the term:
This semester I was given the opportunity to join the open source BlackBerry 10 PhoneGap team for a course project. To be part of this team was a once in a lifetime experience as I got to work with students from all over Canada taking the same course. In terms of real life software development experience, this course is as real as it gets!
At the end of the term, I finally made a pull request for my finished plugin through GitHub to merge it to the main branch. Following the merging of my code, my plugin got published in the Apache Cordova Plugin Registry. To say that I have a piece of software I’ve written published in the Internet is a great sense of accomplishment. Being a part of UCOSP and BlackBerry 10’s PhoneGap team was an amazing experience. If I were given the opportunity to take this course again, I would do it!
As Thomas mentioned, we were able to take his contribution and immediately publish it to the plugin registry, while the source is in our repository for others to benefit from. Take a look in either location if you’d like to see the details of the API that is provided. At a high level, it allows you to listen for both long and short presses on any of the three hardware media keys, with a simple set of options. There’s a sample application included in the source repo too. If you’re interested in following along with the student project, watch #bbucosp on twitter. All of the code will be going into the public BlackBerry repositories on GitHub. If you want to get involved yourself, contact me to get started: @timothywindsor on twitter, https://github.com/timwindsor on GitHub.