It's easy to add AirBop and Google Cloud Messaging to your Android app.
This article will explain how to create a new AirBop project, starting with setting up a Google API project in order to get the necessary Google API Key and Google Project Number.
In order to create a new project in AirBop, you first need to create a Google API project with the GCM Service enabled. This will provide you with two elements needed to create an AirBop project: your Google API Key, and your Google Project Number. You will also be required to provide the Java Package Name for the app you want to add to AirBop.
The sections below will describe these steps in further detail.
As described in Google's GCM: Getting Started article.
Open the Google APIs console page.
If you've never created an API project, you'll receive the following prompt:
After the initial prompt, or if you've previously created projects, you'll be shown the Google APIs console.
You can switch between projects using the drop-down in the upper left corner. If this is your first project, the drop-down will show the default project name ("API Project").
You can use the drop-down menu to rename the current project, or create a new project by choosing Other projects > Create.
You can find your Google Project Number after #project: in the URL.
For example, the project number in the link below is 827171612957:
https://code.google.com/apis/console/#project:827171612957
The project number is also listed on the "Overview" page for your project in the Google APIs console.
Make note of your Google Project Number as you will need it when using AirBop.
Note: the Project ID field on the Dashboard "Overview" page contains a "Register..." link that lets you register a project ID, but it isn't something you need to use for AirBop; the Project Number is what you want.
The next step is to enable the Google Cloud Messaging for Android service for your project.
The next component that you will need in AirBop is your Google API Key.
Make note of the Google API Key as you will need it when creating a project in AirBop.
You now have the two elements required to create an AirBop project, your Google Project Number, and your Google API Key.
The next step is to create an AirBop project that can be used to send notification messages to your app. The following steps outline the procedure for creating an AirBop project for an Android application.
You can log in to your AirBop account from AirBop's home page: www.airbop.com
After logging in, you'll see the Dashboard, where any apps you have already set up with AirBop will be listed.
Select the Add New App link to begin adding a new app.
AirBop requires the following information for your app:
This is a label that you can use to identify the app in your AirBop account. This value is only used for organizational purposes.
The java package name of the app you're planning to add push notification support to.
Your Google API Key, as described in Step 4 of Creating a Google API Project.
Click the Save changes button to save the information you entered.
After you've saved your changes, AirBop will generate an AirBop App Key for your app and display it next to the label "AIRBOP_APP_KEY" on your app's Info tab.
At this stage you have all of the information required by the AirBop servers to send messages to an Android app. The next step is to add the required Java code to your app in order to register and receive messages from the AirBop servers.
You'll need the following values on hand when writing the client app code:
There are two articles available to help you integrate GCM and interact with AirBop:
Adding AirBop and GCM to your Android App
This article describes a general overview of the GCM components you'll need to add to your Android app, as well as what's required to interact with the AirBop servers.
Sample 'AirBop Client' Android app source code
The sample project allows you to easily build a working app and see the result of the messages sent using AirBop's service. You're welcome to use any of its helper methods and classes in your own app.
Head back to the main tutorial page for further information, examples, and code snippets, or take the leap and sign up now to add AirBop to your Android app - for free.
More Tutorials Sign Up Now