WildFly 8 meets AeroGear UnifiedPush Server

Congrats to the WildFly team on releasing their 8.0.0.Final!

For integrating the AeroGear UnifiedPush Server with WildFly only a few steps are required!

First, download and start the server, like:

$WILDFLY_HOME/bin/standalone.sh -b

Now you just need to build the master branch of the mobile push server. For that you simply need to clone the repo:

git clone git@github.com:aerogear/aerogear-unifiedpush-server.git 

and build the source code:

cd aerogear-unifiedpush-server
mvn clean install

Now you need to deploy a database-source (here we are using H2, the Java SQL database):

cp databases/unifiedpush-h2-ds.xml $WILDFLY_HOME/standalone/deployments

Once the database is deployed (check the WildFly console output), it is time to deploy our UnifiedPush Server:

cp server/target/ag-push.war $WILDFLY_HOME/standalone/deployments

That’s all! However in order to use the mobile push server to send notifications to your mobile clients, you need to login (http://localhost:8080/ag-push) and change the default password (123) of the adminuser.

If you are interested in mobile push, you can learn more about the AeroGear UnifiedPush Server by reading our different push tutorials and guides.

Posted in aerogear

AeroGear UnifiedPush Server 0.9.0 released

I am happy to announce that we have a new release of the AeroGear UnifiedPush Server!

This release contains again a some API changes. The most important one is a true unification of our supported client platforms. Before this release the SimplePush clients were a bit different, as explained in the referenced thread. Another API change is that we now allow the registered devices/clients to be tagged in multiple categories, e.g. based on app user interest. The two changes now lead to a very lean API for sending Push Notifications to Android, iOS and SimplePush client devices:

curl -3 -u "{PushApplicationID}:{MasterSecret}"
   -v -H "Accept: application/json" -H "Content-type: application/json" 
   -X POST
   -d '{
       "categories" : ["Football", "BVB", "UEFA ChampionsLeague"],
       "message": {
         "alert":"Goal by Marco Reus!",
       "simple-push": "version=someVersionNumberString"


Of course the different client SDKs support the above API changes on the server 

Based on community feedback we also added a notification handler to the Java Client, which can be used in your Java (backend) application to post notification request against the AeroGear UnifiedPush Server. The callback looks like:

aerogearPushClient.send(push-message, new MessageResponseCallback() {

  public void onComplete(int statusCode) {
    // your logic goes here

  public void onError(Throwable throwable) {
    // handle error

The umbrella PushApplications and their logical variants are protected by a Key and a secret. For the secret we now allow the user to reset it, using our Admin UI:

AeroGear Admin UI

Besides that we had several improvements (HSTS, Mysql CLI or AdminUI tweaks) and enhancements (e.g. Time-to-live for Android and iOS notifications) and new examples like geolocation support with Hibernate Search.

Now, you can download the WAR file and give it a shot!

Have fun! Matthias

Posted in Uncategorized

AeroGear UnifiedPush Server 0.8.1 released

I am happy to announce that we have a new release of the AeroGear UnifiedPush Server!

The biggest change we did in this release was applying an update to our RESTful Sender API: We now have one single endpoint to deliver Push Notifications to the supported platforms like Android, iOS and Mozilla’s SimplePush. This of course has some impact on the client libraries and we will have the Java Library available on Maven Central shortly, while our latest NodeJS API is already available on npm.

Besides that we added support for JavaEE Bean Validation, added support for WildFly and polished the Admin UI (including an update to Ember 1.0.0). An SSL workaround for our OpenShift cardridge could be remove as well, as the underlying bug was fixed. And other minor things. Below are the enitre release notes for further details!

Now, you can download the WAR file and give it a shot!

Have fun!

Release Notes – AeroGear Push – Version 0.8.1


  • [AGPUSH-255] – Add server side validation and appropriate response body for bad requests
  • [AGPUSH-259] – When adding variant, all “help” links point to iOS help
  • [AGPUSH-298] – PushServer @DELETE methods violate REST specifications
  • [AGPUSH-299] – Misleading info in the Authentication Info section on the Mobile Variant Overview page
  • [AGPUSH-304] – Admin UI should do auth check before rendering content
  • [AGPUSH-342] – Admin UI installation details wrong label Description instead of Device Type
  • [AGPUSH-353] – Loading mispelled


  • [AGPUSH-343] – Add Access-Control-Max-Age to CORS preflight headers

Feature Request

  • [AGPUSH-200] – Add Google “Project Number” to Android Variant
  • [AGPUSH-271] – AdminUI: simplePushEndpoint for SP installations
  • [AGPUSH-275] – UnifiedPush Server: Add database CLI
  • [AGPUSH-287] – Undo OpenShift SSL Certificate workaround
  • [AGPUSH-288] – No way to show variant details if the variant has no name
  • [AGPUSH-302] – UnifiedPush: iOS-Corodva guide
  • [AGPUSH-305] – Move CURL commands to REST API specs
  • [AGPUSH-332] – Allow to add user
  • [AGPUSH-334] – Update to Ember 1.0.0
  • [AGPUSH-341] – Admin UI show push endpoint URL in installation details screen
  • [AGPUSH-354] – remove provider class name in persistence.xml
  • [AGPUSH-356] – Using AuthenticationManager injection with Agent parameter
  • [AGPUSH-357] – Using IdentityManagement injection with User parameter
  • [AGPUSH-375] – Update UnifiedPush Spec to use https



Posted in aerogear

Speaking at JavaOne 2013

It has been a while that I did attend the JavaOne conference, but this year I am back. Yay!

During the conference I am giving two talks focusing on AeroGear and generally Mobile Development, that is powered by Java EE 7:

  • Notify Your Mobile Clients by Integrating Push Networks and Java EE 7 [CON5073] with Jay Balunas
    Monday, Sep 23, 8:30 AM – 9:30 AM – Parc 55 – Market S
  • Developing Enterprise iPhone Apps on Java EE 7 [BOF5117] with Jay Balunas
    Tuesday, Sep 24, 6:30 PM – 7:15 PM – Parc 55 – Embarcadero

Besides the talks I might hangout on the JBoss booth and at the JBoss party !

Looking forward to a great week in San Francisco!

Posted in aerogear

Node.js and the AeroGear UnifiedPush Server

With the recent release of the AeroGear UnifiedPush server and it is very simple to send push notifications to mobile devices.

Node.js integration

Usually a backend application is responsible for sending notifications based on events. Besides a Java library we also have an early version of a Node.js client library.

The setup of the JavaScript library is pretty simple, just clone the repo and install it locally:

npm install path/to/cloned/aerogear-unified-push-node-client

After it is present, the API is pretty straightforward to use:

// import the library
var agSender = require( "aerogear-sender-client" ).AeroGear;

// create the payload for the mobile device
var message = {
  alert: "Sent via AeroGear's Node.js SDK",
  sound: "default",
  badge: 2

// apply the UnifiedPush credentials for sending messages:
var options = {
  applicationID: "myPushApplicationID",
  masterSecret: "myMasterSecret"

// use the sender to submit a 'broadcast':
agSender.Sender( "https://my-server.rhcloud.com" )
  .broadcast( message, options )
    .on( "success", function( response ) {
      console.log( "success called", response );

Once you have included this into your backend application, you are able to receive the message on those devices that are registered with the UnifiedPush Server:

Running the Server in the cloud

If you are interested in testing the server, it is quite simple to try our OpenShift cartridge – no server installation is required!

Have fun!

Posted in aerogear

Push Notifications for Android, iOS and Web

Today we are releasing the first community release of the AeroGear UnifiedPush Server!

The AeroGear UnifiedPush Server is a server that stores devices specific metadata and is able to sendpush notifications to different (mobile) platforms. The initial version of the server supports Apple’s APNs,Google Cloud Messaging and Mozilla’s SimplePush.

Three supported platforms

While Android and iOS are pretty much very well known, it’s worth spending a few seconds onSimplePush. SimplePush is a specification from Mozilla that describes a JavaScript API and a WebSocket-based protocol which allows backend/application developers to send notification messages to their web applications. Originally SimplePush was introduced for Firefox OS but there are plans to establish the API on the desktop and mobile browsers as well.

The AeroGear project is releasing a Netty-based server and a polyfill JavaScript library for SimplePush as well.

A few problems with Push Notifications

In order to be able to send messages to specific devices, the server side application needs to know the device token, which means the application on the device needs to store it on the server side database.

Another problem is that if you are supporting multiple platforms, they all have different APIs and behave differently – not only on the client side. You need to ensure that the server side application sends the notifications to all clients, for all supported platforms.

Enter AeroGear UnifiedPush Server

The AeroGear UnifiedPush Server addresses these concerns as it is capable to store device specific metadata, including device tokens and it offers a unified way to deliver notifications to Android, iOS and JavaScript applications.


All features of the server are powered by RESTful APIs:

  • registration of device specific metadata
  • sending push notifications
  • Management of the PushApplications and their different variants


The management of the PushApplications, their variants and all of the actual device installations are best handled by the AdminUI, which is based on Ember.js and Topcoat

Device Registration

As indicated on the above image we have SDKs for our supported platforms (AndroidiOS and JavaScript) to help registration of client devices with the AeroGear UnifiedPush Server.

Sending Push Notifications

Sending can be done over the RESTful API:

curl -u "{PushApplicationID}:{MasterSecret}"
   -v -H "Accept: application/json" -H "Content-type: application/json"
   -X POST
   -d '{


The above sends a broadcast notification to all the different platforms, supported by our server. Using commandline cURL is nice for testing, but for backend applications you usually want a more fluent API. Right now we do have a Java and a Node.js client. A PHP SDK is currently being developed.

To the cloud – and beyond

The AeroGear SimplePush and UnifiedPush server have been bundled in a OpenShift cartridge, so that you can get started in just minutes!


We hope you enjoy what we offer and we are looking forward getting feedback, bug reports and feature requests!

Posted in aerogear

What’s new in AeroGear iOS ?

The 1.2.0 version of aerogear-ios contains only one minor change, the deprecation of thelogin: password: success: failure method.

APNs support

With the August release the entire AeroGear focus was around adding Push Notification. Two servers (seeUnifiedPush Server Blog and SimplePush server blog for more details) have been written and we added support to our client platforms (see here for Android/JS) as well!

For the iOS library that obviously means adding support for the Apple Push Notification Service.

Stay standard!

For receiving APNs push notifications there are no extra APIs introduced. The standard Apple APIs work with the AeroGear UnifiedPush server and the our AeroGear Push SDK. For instance, you can use the existing delegate for receiving remote notifications while the application is running, like:

- (void)application:(UIApplication *)application 
  didReceiveRemoteNotification:(NSDictionary *)userInfo {
    // extract desired value from the dictionary...

Device Registration

In order to be able to receive push notifications you need to register the iOS device token with a server. The same is true when using the AeroGear UnifiedPush server. The SDK helps you to perform an easy registration:

- (void)application:(UIApplication *)application
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {

  AGDeviceRegistration *registration = 
    [[AGDeviceRegistration alloc] initWithServerURL:
     [NSURL URLWithString:@"http://YOUR_SERVER/ag-push/"]];

  [registration registerWithClientInfo:^(id<AGClientDeviceInformation> clientInfo) {

    // required fields
    [clientInfo setDeviceToken:deviceToken];
    [clientInfo setVariantID:@"YOUR IOS VARIANT ID"];
    [clientInfo setVariantSecret:@"YOUR IOS VARIANT SECRET"];

    // --optional config--
    UIDevice *currentDevice = [UIDevice currentDevice];
    [clientInfo setOperatingSystem:[currentDevice systemName]];
    [clientInfo setOsVersion:[currentDevice systemVersion]];
    [clientInfo setDeviceType: [currentDevice model]];
    } success:^() {
      NSLog(@"PushEE registration worked");
    } failure:^(NSError *error) {
      NSLog(@"PushEE registration Error: %@", error);

All you need is simply providing the URL of the UnifiedPush server, the deviceToken, the variantIDand the variantSecret.

In the UnifiedPush server when you create an iOS Variant for a PushApplication, the AdminUI does provide the information about the variantID and the variantSecret:

Xcode Template

Our AeroGear Xcode Template has been updated and supports the new Push SDK as well:


Getting started with the APNs is hard, especially with setting up all the Apple related things, like certificates or provisioning profiles. We have create a tutorial that explains the entire workflow, of using the AeroGear UnifiedPush server and the iOS SDK, explained with a simplified demo application.

Check it out!

Feedback welcome

Reach out to us on IRC or our mailing list. Bugs and feature requests are always welcome in our JIRA instance.

Enjoy !

Posted in aerogear

Get every new post delivered to your Inbox.

Join 32 other followers