AirBop Push Message Notifications
This feature allows you to enable push notifications in your Andromo app using AirBop's messaging service. It's free to sign up for an AirBop account, and free to use for up to 1,000 devices. A variety of plans are available to choose from. For more information about AirBop, visit: http://www.airbop.com.
This feature can be enabled on the "Services" tab of your Andromo project's settings.
This feature allows you to do the following:
- Send a notification message to your app with a title and a message.
- Allows you to pass a URL to open when the user clicks on the notification message.
- Allows you to specify an activity in your app to open when the user clicks on the notification message.
- Allows you to do nothing when the user clicks on the notification message.
- Allows the end user to enable or disable the app's notifications using a preference.
- Allows the end user to enable or disable the app's notification sound using a preference.
- Allows the end user to enable or disable the app's notification light using a preference.
Below are examples of what the user will see when a notification is sent to your app.
Notification Message (on Android version 4.1 or later):
Notification Message (on Android version 2.2):
App's Notification Preferences (available from the options menu):
Visit https://www.airbop.com/users/sign_up to sign up for an AirBop account. If you already have an AirBop account, proceed to creating a Firebase project.
Once you sign up, you'll be emailed a 'Confirmation' notice. Before you can login, you must go to your email box, find the email and then click on the link found in the message.
You can then login to your AirBop account at https://www.airbop.com/users/sign_in.
Google has recently transitioned from the Google Cloud Console to the Firebase Console for creating new projects with cloud messaging. This means that the steps required to create your Google project have changed. Previous instructions can be found Here. The instructions below are for creating a cloud messaging project in the Firebase console to use in AirBop and Andromo.
Open the Firebase Console page. You'll be required to sign in with a Google account.
If you have not created a project you will be prompted to do so. However if you have you will see a list of your projects. To create a new project press the "Create New Project" button.
On the "Create a project" dialog, enter a project name, select your country/region, and then press the "Create Project" button.
Click the Settings button in the upper left corner next to your project name and select "Project Settings".
On the "Settings" page, select the "Cloud Messaging" tab. This page contains the keys you'll need to enter in your AirBop and Andromo projects as discussed in the steps below.
Once you've created a project in Firebase, the next step is to create a project in AirBop:
Log in to your AirBop account at 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.
Enter the name of your app in the "App Name" field. This is a label that you can use to identify the app in your AirBop account. This value is only used for organizational purposes.
Enter your app's Java Package Name. This value can be found on the "App Info" tab of your Andromo project beside the label "Package Name". It will be a value such as com.andromo.dev12345.app12345. If you're using a custom package name, you would copy the value from the "Custom Package Name" field instead.
Copy the "Legacy Server key" value from your Firebase project's "Cloud Messaging" tab to the "Google API Key" field.
Click the Save changes button to save the information you entered. After you've saved your changes, AirBop will generate an AirBop App Key and App Secret for your app and display it next to the labels "AIRBOP_APP_KEY" and "APP_SECRET" on your app's Info tab. These values are needed in your Andromo project discussed in the next step.
Once you've created your Firebase project and AirBop project, the next step is to enable and configure it's settings in your Andromo project.
Select the "Services" tab of your Andromo project.
Select "Enable AirBop Messaging" under "AirBop Push Message Notifications".
Copy your "AIRBOP_APP_KEY" value from your AirBop project into the "AirBop App Key" field. You can find this value on the "Edit" tab of your AirBop project's settings.
Copy your "APP_SECRET" value from your AirBop project into the "AirBop App Secret" field. You can find this value on the "Edit" tab of your AirBop project's settings.
Copy the "Sender ID" value from your Firebase project into the "Google Project Number" field. You can find this value on the "Cloud Messaging" tab of your Firebase project's settings.
Press the "Save Changes" button to save the your settings.
After you've saved the Push Message settings in Andromo, the next step is to build, download, and install your app on your device. In order for your device to register with GCM and AirBop, your app needs to be run to perform the registration. After running your app you should see your device listed under "Recent device registrations" on the "Info" tab of your app's settings on the AirBop website. Once your device is successfully registered, you're ready to send a notification message to it.
General information about sending messages to your app can be found in the AirBop knowledge base article, 'Sending a New Message' found here: http://support.airbop.com/kb/dashboard/sending-a-new-message
The following AirBop features are NOT supported in Andromo apps:
- JSON Mode of Message Details with custom values. Values other than "title", "message" and "url" will be ignored.
- Label setting of Device Targeting.
The Target URL setting of the Message Details in AirBop controls what you want to display when the user clicks on the notification. Andromo provides three different options for the handling notification clicks:
Do Nothing - If you leave the Target URL blank, nothing will happen when the user clicks on the notification message. It will just be dismissed.
Open a Website - If you specify a website URL such as http://www.andromo.com, it will be opened in the user's default web browser application when the user clicks on the notification.
Open an Activity in your App - In addition to URL handling, Andromo supports a special type of target URL that enables you to open a specific activity in your app when the user clicks on the notification.
The Target URL format used to open an activity is as follows:
Each activity contains an internal unique identifier that can be referenced for opening it. You can find each activity's reference URL in the "Activity URL" section of the activity's "Edit" page, below its Example Screenshot. Each activity's settings can be accessed from the "Activities" tab, by clicking the activity name or icon, or by selecting "Edit" from the Action dropdown next to the activity you're looking for. Below is an example of this value:
where "website158941" is the internal identifier for that particular activity. This value will be different for each activity in your project.
If an invalid activity identifier is used as the Target URL in AirBop, the notification will open the app's dashboard instead. If you'd like to specifically open the dashboard, you can specify the following value:
The following Andromo activity types are NOT supported using the Target URL feature:
- Google Play