Last step! Now that your mobile device is set up, lets make your backend server send notifications to this UnifiedPush Server using Aerogears Java sender API:
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 } });
If you have questions about this process, visit the documentation for full sept by step explanation.