[英]How to use Google Direction API in Android
At first really sorry for asking a stupid question. 起初,真的很抱歉问一个愚蠢的问题。 Is it necessary to generate API key to use Google Direction API in my Android Application.
是否需要生成API密钥才能在我的Android应用程序中使用Google Direction API。 How to generate Google Direction API key?
如何生成Google Direction API密钥? Link of any documentation is preferred.
首选任何文档的链接。 Thanks in advance.
提前致谢。
Firstly There is no such thing in this world as a stupid question. 首先,这个世界上没有一个愚蠢的问题。
Secondly go through this documentation you will find what you need 其次, 浏览本文档,您将找到所需的内容
EDIT VERSION : Follow these steps. 编辑版本:请按照以下步骤操作。
or esle use this key which i just generated for a sample project. 或esle使用我刚刚为示例项目生成的此密钥。
AIzaSyDZOj1QSw4MM4RzPdUEeNTLEhlntcyfMqw AIzaSyDZOj1QSw4MM4RzPdUEeNTLEhlntcyfMqw
Using an API key has the following effect: 使用API密钥具有以下效果:
This means, the usage of the api on all devices your app is installed on, is summed together. 这意味着,将在您安装了应用程序的所有设备上使用api的总和。
If you do not use the API key, the usage is per IP-address. 如果不使用API密钥,则按IP地址使用。 So the limits of the API apply per device.
因此,API的限制适用于每个设备。
On a server you have to ability to cache (or use other techniques) to minimize calls. 在服务器上,您必须能够缓存(或使用其他技术)以最小化呼叫。 But on a device (IMHO) this ability is limited.
但是在设备(IMHO)上,此功能受到限制。
In my apps, I use the Direction API without API-key, so I do not bump into usage limits. 在我的应用程序中,我使用了没有API密钥的Direction API,因此我没有遇到使用限制。
BTW: you can get an API key using the Google Developers Console . 顺便说一句:您可以使用Google Developers Console获取API密钥。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.