2

I created an Application about 1 year back on Android version 2.1 and made available to all the other versions of Android. At that time Android mobiles with versions 2.1, 2.2 and 2.3 were very common.

So I tested my application on all available versions and there was no issue.

Now Android with versions 4 has become the hottest mobile in the market. When I test my application on the versions of 4 it started crashing.

My question is how to ensure that the application that we develop now should be compatible with the later versions which are not available now ?

How to write applications [OR] what are the things that I need to consider so that with minimal code changes it should work on all the versions ?

Puru
  • 8,913
  • 26
  • 70
  • 91

2 Answers2

2

By testing your applications on the new versions. I'm sorry that is really the only half fool proof solution. The versions get out in plenty of time to test on the emulator so there really isn't any excuse.

My guess is that you've done some nono like downloading data on the main thread. That isn't allowed any longer. Your application then don't get the data and you get a bunch of null pointer exceptions (which you'd also have gotten if data access had been missing).

Warpzit
  • 27,966
  • 19
  • 103
  • 155
1

There is no perfect answer. Android will forever be evolving and changing. Hopefully it will continue to do so for the better like it has been. Google forsaw this issue, which is a small part of the reason they made it so easy to update an app. you will just have to update as it comes. it is its greatest strength, that it can always change, grow, and get better.

WIllJBD
  • 6,144
  • 3
  • 34
  • 44