我在Android Market中注意到许多流行的应用程序都向后兼容早期版本的Android.例如
Evernote - 1.6
Faceobook Messenger - 2.2
Run Code Online (Sandbox Code Playgroud)
这些应用程序外观和工作都很棒,但他们如何做到这一点并支持更旧的API级别?他们只使用支持最低的操作系统版本中存在的API功能吗?我假设他们必须使用更高级API级别的某些功能来提供出色的UI和功能列表.
我可以看到两种可能的解决方案
Use Min/Target API levels in build. Then through code you check the OS version and implement the features using a supported method and degrade gracefully. This seems like a lot of work.
Have multiple app versions targeting various OS versions. E.g. A release for 2.2 and another for 4.0. Is this possible?
问的原因是我正在计划一个应该支持2.2的新应用程序,但我担心我可能需要仅在以后的版本中提供的API功能?我应该只针对2.2?
编辑:此外,兼容性库的作用是什么?这是关键吗?
谢谢.