Skip to content

mfischelmayer/aerogear-push-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Aerogear Helper

Java client for the Aerogear Push REST Service API.

(see also https://aerogear.org/docs/specs/aerogear-unifiedpush-rest/index.html)

Actually working with aerogear unified pushserver 1.1.0

Attention - project in an early alpha ;-)

// create a instance of the PushServer you like to connect
PushServer pushServer = new PushServer("https://aerogear.example-server.at");

// for the most administrative calls you need to authenticate via keycloak
pushServer.setKeycloakCredentials( String username, String password, String clientId );

// create the push administration service
AergearAdminService admin = new DefaultAergearAdminService( pushServer );

// make the api call
List<PushApplicaitonResult> pushAppsOnServer = admin.showPushApplications();

some examples

register Device
Installation installation = new Installation();
installation.setDeviceToken("95f86df5b64e20a45e0e67782984abeb553a3232fcedf1d75407885798be67");
installation.setAlias("ftec Test Device");

adminService.registerDevice(installation, "your-variant-id", "your-variant-secret");
create Push Application
PushApplication newPushApp = new PushApplication();
newPushApp.setName( "My Test Application" );
newPushApp.setDescription( "created with ftec aerogear lib" );
newPushApp.setDeveloper( "Michi" );

adminService.createPushApplication( newPushApp );
show health status
HealthStatus healthStatus = adminService.showHealthInfo();
String healthSummary = healthStatus.getSummary();

contact information

Michael Fischelmayer

mailto:michael.fischelmayer@ftec.at

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages