开发者

Moving an existing app to Android 3.x

I have a published app for Android 1.x and 2.x, and now I want to make it support 3.x.

But Android 3.0 has massive API change, especially on UI, thus if I want to make one app compatible to 2.x and 3.x, the code will be ugly and package file will be huge.

On the other hand, if I make another app for 3.x, then I need to maintain two copies of their common codes. That's really annoying.

What should I choose, or does anyone have a mo开发者_JAVA技巧re smart solution? Thanks!


If you package them together you could still maintain everything separately - For example: put a prefix in front of every layout and class for 3.x, such as honeyMain.class, and honeymain.xml

Or you could do it a way that makes more sense for you.

Or keep them partially together.

It WILL make your app larger, but then when 15 people with 3.x download it and 60 people with 2.x download it, you get 75 downloads, instead of 15 for one app and 60 for the other. The 75 cumulative will look better on the apps over all ranking on the market.

On the other hand, if the 3.x is really ugly or FCs, then negative ratings will impact both 2.x and 3.x, but that is easily controlled for by testing, testing, testing.

Also, I personally hate managing code for two different apps. It's overly repetitive.

So, my recommendation is to package them together.


Make use of resource qualifiers, e.g. -xlarge, -v11, etc.

Use reflection where necessary or other techniques to avoid pulling in stuff not supported by API level.

Use the compatability library, that way you can fragmentize your code regardless, avoiding duplication, and with little effort handle different screen sizes.

See providing resources

See multple screens

See compat lib


Right click on your project and select "properties",select "android" from window,and which type of version you want check it and apply

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜