Example #1
0
        public void Cleanup()
        {
            CognitoIdentity.CleanupIdentityPools();

            CleanupCreatedRoles();

            if (facebookUser != null)
            {
                FacebookUtilities.DeleteFacebookUser(facebookUser);
            }

            using (var sns = new AmazonSimpleNotificationServiceClient())
            {
                foreach (var topicArn in topicArns)
                {
                    sns.DeleteTopic(topicArn);
                }
                topicArns.Clear();

                if (platformApplicationArn != null)
                {
                    sns.DeletePlatformApplication(new DeletePlatformApplicationRequest
                    {
                        PlatformApplicationArn = platformApplicationArn
                    });
                }
            }
        }
        public void removeNotification(string username)
        {
            //arn:aws:sns:us-west-2:336632281456:app/GCM/mobileapp
            //_platform
            var request = new DeletePlatformApplicationRequest
            {
                PlatformApplicationArn = "arn:aws:sns:us-east-1:80398EXAMPLE:" +
                                         "app/GCM/TimeCardProcessingApplication"
            };

            snsClient.DeletePlatformApplication(request);
        }
Example #3
0
        public static void SNSMobilePushAPIsDeletePlatformApplication()
        {
            #region SNSMobilePushAPIsDeletePlatformApplication
            var snsClient = new AmazonSimpleNotificationServiceClient();

            var request = new DeletePlatformApplicationRequest
            {
                PlatformApplicationArn = "arn:aws:sns:us-east-1:80398EXAMPLE:" +
                                         "app/GCM/TimeCardProcessingApplication"
            };

            snsClient.DeletePlatformApplication(request);
            #endregion
        }
        public bool DeletePlatformApplication(string platformApplicationArn)
        {
            if (platformApplicationArn == null)
            {
                return(false);
            }

            var request = new DeletePlatformApplicationRequest
            {
                PlatformApplicationArn = platformApplicationArn
            };

            try
            {
                snsClient.DeletePlatformApplication(request);
                return(true);
            }

            catch (Exception e)
            {
                return(false);
            }
        }