Paul Bartels wrote:I was wondering with the range of phones out there that run on android, is there something analogous to degrading such as there is in webapps?
For example, a well designed webapp will still function (albeit with reduced functionality) if the user doesn't allow say, flash or in a more extreme case javascript...
Does android come with a good way of doing this? Or is it a matter of having to manually detect the environment and program around it?
Part of the functionality of an app that I developed is to display streaming video clips. In order to do this, I used the
android.widget.VideoView class.
Using
VideoView was frustrating because many of the methods are undocumented, so there was a bit of trial and error involved in getting it to work. One issue that I encountered was that if the video was already started, then to resume playing after pausing I needed to use the
resume method on Android 2.2+ (API Level >= 8), but
start on Android devices running less than version 2.2. I ended up using the
Java Reflection API to dynamically call
resume if it is available, or else
start.
I guess that that is one way to "detect the environment and program around it", but I am curious if there are better ways.