private void CreatePlatformApplication()
{
using (var sns = new Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient())
{
// Create target topic
var topicArn = sns.CreateTopic(new CreateTopicRequest
{
Name = "TestTopic" + new Random().Next()
}).TopicArn;
topicArns.Add(topicArn);
var platformAppName = "NetSDKTestApp" + new Random().Next();
// Create a platform application for GCM.
platformApplicationArn = sns.CreatePlatformApplication(new CreatePlatformApplicationRequest
{
Name = platformAppName,
Platform = "GCM",
Attributes = new Dictionary <string, string>
{
{ "PlatformCredential", PlatformCredential },
{ "PlatformPrincipal", "NA" },
{ "EventEndpointCreated", topicArn },
{ "EventEndpointDeleted", topicArn },
{ "EventEndpointUpdated", topicArn },
{ "EventDeliveryAttemptFailure", topicArn },
{ "EventDeliveryFailure", topicArn },
}
}).PlatformApplicationArn;
}
}