aspose file tools*
The moose likes Android and the fly likes degrading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "degrading" Watch "degrading" New topic
Author

degrading

Paul Bartels
Greenhorn

Joined: Jun 16, 2008
Posts: 11

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?


SCJP5 SCWCD
robi sen
author
Ranch Hand

Joined: Jan 25, 2011
Posts: 33
Interesting question. In general its like developing for a specific desktop operating system such as windows where you target the specific hardware. In some cases you need to take in account specific vendor modifications to Android but most of the time you can target a set of technical specifications if you want to develop something like a game. For more generic applications, such as a todo list, you can build your application so that it conforms to screen size, orientation, and the like with very little concern about specific platform. In general the simpler your application the less you have to worry about the specific phone. Thus a simple todo list app may work on almost any phone from a HTC Hero running 1.6 to a Nexus S running 2.3. Something like a video game were you count on the API, specific hardware like a Nvida accelerator, certain clock speed of CPU, size and type of display etc your are going to really have to test your app on specific hardware and there will be little you can do for backwards compatibility or graceful degradation.
Michael Rivera
Ranch Hand

Joined: Dec 31, 2007
Posts: 123

You will need to think about the android firmware you are trying to run it with. And also if the handset manufacturers will support those


So many things to do so little time !!!
@mikedroid myLinkedIn
Daniel Trebbien
Ranch Hand

Joined: Jul 10, 2007
Posts: 57
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: degrading