如何在Android中以最佳的向后兼容性实现谷歌地图? [英] How to implement google maps with best possible backward compatibility in an android?
问题描述
我正在构建一个简单的Android应用,使用Google Maps API来显示地图和导航。正如你可能知道的谷歌地图需要播放服务库运行客户端Android手机。我希望我的应用运行在更老的android操作系统(14,15,..)
问题:
$ b
1-客户需要安装或激活Play服务
然后,客户必须将Play服务应用更新到最新版本才能使用我的Google地图应用。
3-如何让应用程序在老机器人中运行?只是通过指定min sdk?
所以为了解决第一个和第三个问题我不知道,但第二个问题:
与旧版Play服务依赖可能会有帮助,但我不知道如何做到这一点,甚至是否有帮助。
如果家伙提供任何解决方案,它将很感激!
谢谢大家。
保持Android最大向后兼容性的推荐做法应用程序,而这取决于Google Play服务?
以下是我可以汇总的关于向后兼容性的指针,包括使用Google Play服务的指针。 p>
-
Google Maps Android API 使用OpenGL ES版本2 来渲染地图。支持此功能的最少Android API版本是 API 8或Android 2.2 a>。
-
针对包含您需要的API的最早版本的Google Play服务进行编译。如此主题中进一步讨论的,请避免使用通配符,如5. +,因为该更新到最新的播放服务。请使用com.google.android.gms:play-services:5.0.89等广泛使用的版本。
使用V4支持库来验证和请求权限。 The Google Maps Android API uses OpenGL ES version 2 to render the map. The least Android API version that has support for this is API 8 or Android 2.2 .
Compile against the oldest version of Google Play Services that contains the APIs that you need. As further discussed in this thread, refrain from using wildcards like 5.+ because that updates to the latest play services. Instead use a widely used version like com.google.android.gms:play-services:5.0.89.
Use the V4 support library to verify and request permissions.
com.android.support:support-v4:23.0.1
您也可以通过 SO线程。
I'm building a simple android app that uses Google maps api to display map and navigation. As you may know Google maps need Play services Library to run on client android phone. i want my app to run in much older android OS's(14,15,..) Problems:
1- Clients need to install or activate Play services app.
2- then Clients have to update play services app to the latest version to use my app with google maps.
3- how to make app to run in older androids? just by specifying min sdk ?
so in order to solve first and third problem i've no idea but for the second one : building project with older Play service dependencies may help but i dont know how to do this or even it helps or not.
it'll appreciate if guys offer any solutions ! Thank you all.
What are the recommended practices for maintaining the widest backwards compatibility of an Android app while depending on Google Play Services?
Here are the pointers I was able to aggregate concerning backwards compatibility, including those that use Google Play Services.
com.android.support:support-v4:23.0.1
You might also check some additional insight from this SO thread.
这篇关于如何在Android中以最佳的向后兼容性实现谷歌地图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!