简体   繁体   English

Google App Engine存储

[英]Google app engine Storage

I created an application that displays emergency numbers and allows the user to add their own emergency numbers to the list. 我创建了一个显示紧急电话号码的应用程序,并允许用户将自己的紧急电话号码添加到列表中。

I also created a web application project to handle the server part of the app. 我还创建了一个Web应用程序项目来处理应用程序的服务器部分。

I can run it locally, but I need to store it globally on the GAE. 我可以在本地运行它,但需要将其全局存储在GAE上。

I am aware that I need an application ID, but how do I link my android application to that web application that I have deployed? 我知道我需要一个应用程序ID,但是如何将android应用程序链接到已部署的该Web应用程序?

Do I need to insert the API key somewhere and switch on any services? 我需要在某处插入API密钥并打开任何服务吗?

Its not creating my numbers now if I deploy so I know Im doing it wrong. 如果我部署它,现在不会创建我的号码,所以我知道我做错了。 Please please help. 请帮忙。

In the Api Console you need to enable the "Google Cloud Messaging For Android" service. Api控制台中,您需要启用“ Google Cloud Messaging For Android”服务。

Then, In "API Access" tab, you need to add a Server Key , and an Android Key (actually two android keys - one for debug and one later for the released version - don't forget that!) 然后,在“ API访问”选项卡中,您需要添加一个服务器密钥和一个Android密钥 (实际上两个android密钥-一个用于调试,一个稍后用于发行版本-别忘了!)

Then in the Endpoint classes you need to add the following to the @Api annotation: 然后,在Endpoint类中,需要将以下内容添加到@Api批注中:
clientIds - The Ids of the Android Client Keys clientIds -Android客户端密钥的ID
audiences - The "Client ID for web applications" 听众 -“ Web应用程序的客户端ID”

Which will eventually look like this: 最终将如下所示:

@Api(name = "endpoint_name"
    clientIds = {"porject_number-android_debug_key.apps.googleusercontent.com",
                 "porject_number-android_release_key.apps.googleusercontent.com"},
    audiences = {"project_number.apps.googleusercontent.com"})

Above the class declaration. 上面的类声明。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM