简体   繁体   中英

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.

I can run it locally, but I need to store it globally on the 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?

Do I need to insert the API key somewhere and switch on any services?

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.

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!)

Then in the Endpoint classes you need to add the following to the @Api annotation:
clientIds - The Ids of the Android Client Keys
audiences - The "Client ID for web applications"

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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