All Cloud API calls must be made on the UI (main) thread, and callbacks are executed on the UI thread.
- REST API method endpoint relative to "api.cloud.appcelerator.com/v1". Method endpoints are listed in the corresponding entries in the REST API documentation.
- The HTTP method to use.
- Data to send with the request.
- Configure push services for your application.
- Add Google Play services as a dependency to your project and update the project's
AndroidManifest.xmlfile. See the Android Project Requirements section below.
- Retrieve the device token and subscribe to push notifications with Arrow Push. See the Subscribe to push notifications section below.
Android Project Requirements for using APSCloud Push
- In Eclipse, select File > Import > General > Existing Projects into Workspace and click Browse.
- Navigate to the
appcelerator-sdk-android-<VERSION>/examples/APSCloudPushExamplefolder and click Open.
- Click Finish to import the project.
- Add the Google Play services to your project (see Android Project Requirements for instructions).
In MainActivity.java, locate the following line and replace << YOUR APP KEY >> with the application key generated by Dashboard (see instructions):
Table Cell (td) Code Block language js
String appKey = "<< YOUR APP KEY >>";
- Run the application in an Android device or emulator.