Getting Started with AirBop

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.

Step 1 - Create an API Project

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.

Step 2 - Get Your Google Project Number

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.

Step 3 - Enable the GCM Service

The next step is to enable the Google Cloud Messaging for Android service for your project.

  • On the main Google APIs Console page, select Services (found in the upper left-hand corner).
  • Locate Google Cloud Messaging for Android in the list, and toggle the button to ON.
  • Read and accept the terms of the service.

Step 4 - Get your Google API Key

The next component that you will need in AirBop is your Google API Key.

  • On the main Google APIs Console page, select API Access (found in the upper left-hand corner).
  • Look in the section labeled Simple API Access for the value API key. This value is the Google API Key for your project.

Make note of the Google API Key as you will need it when creating a project in AirBop.

Done - Ready to Move on to 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.

Step 1 - Log in to your AirBop Account

You can log in to your AirBop account from AirBop's home page: www.airbop.com

Step 2 - Add a New App

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.

Step 3 - Enter App Information

AirBop requires the following information for your app:

App Name

This is a label that you can use to identify the app in your AirBop account. This value is only used for organizational purposes.

Java Package Name

The java package name of the app you're planning to add push notification support to.

Google API Key

Your Google API Key, as described in Step 4 of Creating a Google API Project.

Step 4 - Save Your Changes

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.

Step 5 - Add Google Cloud Messaging to your App

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:

  • Your Java Package Name
  • Your Google Project Number
  • Your AirBop App Key
  • Your AirBop App Secret

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