Twitter has made me so lazy that I rarely post on my blog these days. Also had been traveling over the last 2 months so had been a bit busy. Anyway, SG-GTUG had been kind enough to invite me to give a talk on Android at Google, Singapore on September 18, 2010. Bharathi Subramanian from SQLSTAR was the program chair for this event.
I spoke at length about the Media framework of Android. While I clearly appreciated some features such as ease of writing OpenGL-ES applications on Android (as the platform does the EGL config stuff by itself and all the developer has to do is to put together a few GL calls), I reserved my choisiest of abuses for MediaPlayer and MediaRecorder classes in android.media. This was also a result of the frustrations I had been through over the last 9 months dealing with these 2 monolithic classes.
One can argue that they simplify the playing and recording of audio/video content and a developer has to code precious little to get playing and recording of content done. Agreed, BUT there are no other classes to process video and audio content at the SDK level. As I had mentioned in the talk, the MediaPlayer.getFrame() method had been discontinued after API level 1 and MediaPlayer.snoop(), used in some live wallpapers bundled with the SDK, is annotated @hide. I had put up a feature request to expose OMXCodec.h to the NDK so that developers could build powerful media applications.
I thoroughly enjoyed speaking to a lively audience, who bombarded me with questions, some of which I couldn’t provide a clear answer to
But all in all it was time well spent. Special thanks to SPT Krishnan who runs the group and Louis Shue for organizing the event flawlessly. I am attaching my slides to this post. Feel free to use them if you find anything useful. It would always be better if you could cross-check their accuracy quotient
My new post on SG-GTUG blog. It is about Multitasking in Android OS. Would be writing more often from now on the GTUG blog. The link to the original post can be found here.
Enabling multitasking for third party mobile applications can be a tricky proposition in the best of times. Rogue applications hogging memory and draining the battery are most cited concerns – this is common knowledge. It is in this context that Android’s philosophy on multitasking is a refreshing change. Tim Bray has a great overview on Android’s multitasking functionality in his Android Developers blog post. “All applications are created equal” and “All applications run all the time” are the tenets on which the system has been designed and designed elegantly at that. Contrast this with once popular co-operative multitasking systems that depend on user applications explicitly ceding control failing which the device may become unresponsive and you will be able to appreciate the philosophy of Android better.
But the real deal on Android is not multitasking on its own, it is the overall way in which UI components, applications and background components gel together to create a fabulous user experience. Consider an example: Go to the gallery, select a picture to be uploaded to facebook. What the user sees is a Toast prompt saying something on the lines that the picture would be uploaded, further suggesting the user to look at the notification bar for the progress of the upload operation. The user can, in the meantime, select another image for upload and Android obliges. What the user doesn’t see is a upload progress bar blocking further uploads. Instead the nifty notification bar/window takes over that mantle. A background service performs the upload operation and updates the notification window leaving the main application window open for further user interaction.
What if the user chooses to switch the application after choosing to upload the picture? I know that app developers want users to stay on their application longer and may not be comfortable with the user “exiting” their application even though the operation is not fully completed. Worst still what if the operation fails? The notification window solves this problem as well. Whether the user gets an intimation that the operation has failed (say via a Toast) or the user voluntarily checks back in the notification window, clicking on the appropriate notification will lead the user back to the application. Developers even have the freedom to create a custom layout for the notification space. For example, the notification window can contain the application’s icon, action buttons or progress bars. A good starting point for exploring this functionality is RemoteService.java present in ApiDemos.
As explained above, Android spins an excellent mobile experience built around a unique philosophy on multitasking. It is not multitasking itself that makes a difference, it is how applications use the power of multitasking, not just for providing the user with advanced functionality, but offering him a hassle free experience that counts.
Until next time, cheers!