AppsNewsSocial MediaTechnology

Adding the GCM registration to the App

The RegisterActivity can be placed anywhere, for example with the onCreate ()-method. Deploy the sample backend server When you’re ready to deploy an update to your ( the sample ) production backend in the cloud, you can do that easily from the IDE. Click on the “Maven Projects” button on the right edge of the IDE, under Plugins > App Engine, right-click and run the appengine:update goal. As soon as the update is deployed, you can also access your endpoints through the APIs Explorer at http://.appspot.com/_ah/api/explorer.

For testing and debugging, you can also run your backend server locally without having to deploy your changes to the production backend. To run the backend locally, just set the value of LOCAL_ANDROID_RUN to true in CloudEndpointUtils.java in the App Engine module. Build and run the Android app Now build and run your Android app.

If you called RegisterActivity from within your main activity, the device will register itself with the GCM service and the App Engine app you just deployed. If you are running the app on an emulator, note that GCM functionality requires the Google APIs Add-on image, which you can download from the SDK Manager.

You can access your sample web console on any browser at http://.appspot.com. There, you will see that the app you just started has registered with the backend.

Fill out the form and send a message to see GCM in action! Extending the basic setup It’s easy to expand your cloud services right in Android Studio. You can add new server-side code and through Android Studio instantly generate your own custom endpoints to access those

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also
Close
Back to top button