我可以有一个谷歌地图API密钥为我所有的应用程序没有注册自己的包名?自己的、密钥、为我、没有注册

由网友(向你的心口狙击)分享简介:我已经写了一个Android库项目,包括自定义MapFragments,基于谷歌地图Android版V2 API。在谷歌API的控制台,我已经注册库的包名称与我的调试/签名的证书。I have written an android library project that includes custom MapFra...

我已经写了一个Android库项目,包括自定义MapFragments,基于谷歌地图Android版V2 API。在谷歌API的控制台,我已经注册库的包名称与我的调试/签名的证书。

I have written an android library project that includes custom MapFragments, based on Google Maps for Android v2 API. In the Google APIs console, I have registered the library's package name with my debug/signed certificates.

我需要创建一个使用这个库共同code碱基不同的应用程序,我想知道是否有一种方法可以仍然使用图书馆的MapFragments,,而无需添加每个应用程序的包名在谷歌API的控制台。我需要这个,因为我要自动化应用程序的创建(与詹金斯),我不希望任何手动步骤,如登录到API控制台和注册程序包的名称。

I need to create various apps that use this library as common code base and I was wondering if there is a way to still use the MapFragments of the library, without having to add each app's package name in the Google APIs console. I need this because I want to automate app creation (with Jenkins) and I don't want any manual steps, like logging in to the APIs console and registering the package name.

到目前为止,我还没有设法找到一个方法来做到这一点。通配符不工作(如具有的 com.mycompany。的*为控制台包名),如果我没有明确地注册的每个应用程序的包名,地图不加载。

So far, I haven't managed to find a way to do this. Wildcards don't work (e.g. having com.mycompany.* as package name in the console), and if I don't explicitly register each app's package name, the map doesn't load.

是否有可能以某种方式使MapFragments查找的库的的,而不是单一的API密钥/包,应用程序的?

Is it possible to somehow make the MapFragments look up the library's single api key/package, instead of the app's?

推荐答案

下面是如何完成你想创建一个新的API密钥时做的事:

Here's how to accomplish what you're trying to do when creating a new API key:

单击创建新的Andr​​oid按键 请不要输入任何内容到包名称的列表 点击创建

这时你应该会看到AndroidApps:任何应用程序允许的,并且可以使用在所有的应用程序中的地图API密钥而不API控制台上的任何配置

Then you should see AndroidApps: Any app allowed, and be able to use that maps API key in all of your apps without any configuration on the APIs console.

既然你可能已经进入了证书指纹为每个应用程序,只需点击编辑允许Android应用程序,从列表中删除它们,单击更新,应该说任何应用程序被允许使用该API密钥。

Since you have probably already have entered the certificate fingerprints for each of your applications, just click Edit allowed Android apps, delete them all from the list, click update, and it should say any app is allowed to use that API key.

阅读全文

相关推荐

最新文章