List of usage examples for com.amazonaws.services.sns.model CreatePlatformApplicationRequest setPlatform
public void setPlatform(String platform)
The following platforms are supported: ADM (Amazon Device Messaging), APNS (Apple Push Notification Service), APNS_SANDBOX, and FCM (Firebase Cloud Messaging).
From source file:AmazonSNSClientWrapper.java
License:Open Source License
private CreatePlatformApplicationResult createPlatformApplication(String applicationName, SampleMessageGenerator.Platform platform, String principal, String credential) { CreatePlatformApplicationRequest platformApplicationRequest = new CreatePlatformApplicationRequest(); Map<String, String> attributes = new HashMap<String, String>(); attributes.put("PlatformPrincipal", principal); attributes.put("PlatformCredential", credential); platformApplicationRequest.setAttributes(attributes); platformApplicationRequest.setName(applicationName); platformApplicationRequest.setPlatform(platform.name()); return snsClient.createPlatformApplication(platformApplicationRequest); }
From source file:com.aws.sns.service.notifications.sns.AmazonSNSClientWrapper.java
License:Open Source License
private CreatePlatformApplicationResult createPlatformApplication(String applicationName, Platform platform, String principal, String credential) { CreatePlatformApplicationRequest platformApplicationRequest = new CreatePlatformApplicationRequest(); Map<String, String> attributes = new HashMap<String, String>(); attributes.put("PlatformPrincipal", principal); attributes.put("PlatformCredential", credential); platformApplicationRequest.setAttributes(attributes); platformApplicationRequest.setName(applicationName); platformApplicationRequest.setPlatform(platform.name()); return snsClient.createPlatformApplication(platformApplicationRequest); }
From source file:com.dev.appx.sns.tools.AmazonSNSClientWrapper.java
License:Open Source License
public CreatePlatformApplicationResult createPlatformApplication(String applicationName, Platform platform, String principal, String credential) { CreatePlatformApplicationRequest platformApplicationRequest = new CreatePlatformApplicationRequest(); Map<String, String> attributes = new HashMap<String, String>(); attributes.put("PlatformPrincipal", principal); attributes.put("PlatformCredential", credential); platformApplicationRequest.setAttributes(attributes); platformApplicationRequest.setName(applicationName); platformApplicationRequest.setPlatform(platform.name()); return snsClient.createPlatformApplication(platformApplicationRequest); }
From source file:com.mistminds.service.AmazonSNSClientWrapper.java
License:Open Source License
private CreatePlatformApplicationResult createPlatformApplication(String applicationName, Platform platform, String principal, String credential) { CreatePlatformApplicationRequest platformApplicationRequest = new CreatePlatformApplicationRequest(); Map<String, String> attributes = new HashMap<String, String>(); attributes.put("PlatformPrincipal", principal); attributes.put("PlatformCredential", credential); platformApplicationRequest.setAttributes(attributes); platformApplicationRequest.setName(applicationName); platformApplicationRequest.setPlatform("GCM"); return snsClient.createPlatformApplication(platformApplicationRequest); }
From source file:com.screensaver.util.AmazonSNSClientWrapper.java
License:Open Source License
private CreatePlatformApplicationResult createPlatformApplication(String applicationName, Platform platform, String principal, String credential) { CreatePlatformApplicationRequest platformApplicationRequest = new CreatePlatformApplicationRequest(); Map<String, String> attributes = new HashMap<String, String>(); attributes.put("PlatformPrincipal", principal); attributes.put("PlatformCredential", credential); platformApplicationRequest.setAttributes(attributes); platformApplicationRequest.setName(applicationName); platformApplicationRequest.setPlatform(platform.name()); return snsClient.createPlatformApplication(platformApplicationRequest); }
From source file:edu.utn.frba.grupo5303.serverenviolibre.services.NotificacionesPushService.java
private CreatePlatformApplicationResult createPlatformApplication() { CreatePlatformApplicationRequest platformApplicationRequest = new CreatePlatformApplicationRequest(); Map<String, String> attributes = new HashMap<>(); attributes.put("PlatformPrincipal", applicationName); attributes.put("PlatformCredential", serverAPIKey); platformApplicationRequest.setAttributes(attributes); platformApplicationRequest.setName(applicationName); platformApplicationRequest.setPlatform(plataforma.name()); return snsClient.createPlatformApplication(platformApplicationRequest); }