Make your backend server send push notifications through this UnifiedPush Server using Aerogears Java sender API:
You can send notifications to your apps following this 2 stpes. First, on your backend, set up UnifiedPush Server. Second, add a variant and use the snippet on your mobile app to register you device. You can add as many variants as needed. (TODO: improve this text and add links to docs)
JavaSender defaultJavaSender = new SenderClient.Builder("http://localhost:8080/ag-push/").build(); UnifiedMessage unifiedMessage = new UnifiedMessage.Builder() .pushApplicationId("bff6aeb2-6b30-4967-bf0a-9a99d0873a63") .masterSecret("be608987-a0db-458e-b5cd-62200ed006a8") .alert("Hello from Java Sender API!") .build(); defaultJavaSender.send(unifiedMessage, new MessageResponseCallback() { @Override public void onComplete(int statusCode) { //do cool stuff } @Override public void onError(Throwable throwable) { //bring out the bad news } });
This only appears if there are no devices installed on any variant. If you haven't done it yet, the first step to set up your mobile device is to click on Variants and add a variant. Once you get the variant snippet go and register you device.