I am trying to send push notifications through amazon sns. When I manually created GCm application at amazon and application endpoint it gives following error
{Message Body: {"GCM":"{\"collapse_key\":\"Welcome\",\"data\":{\"message\":\"Hello World!\"},\"delay_while_idle\":true,\"time_to_live\":125,\"dry_run\":false}"}}
{Message Attributes:}
May 12, 2015 11:10:09 AM com.amazonaws.http.AmazonHttpClient logRequestId
INFO: x-amzn-RequestId: 60749365-b72d-5a0e-8eca-deae2ca89839
Caught an AmazonServiceException, which means your request made it to Amazon SNS, but was rejected with an error response for some reason.
Error Message: Invalid parameter: TargetArn Reason: No endpoint found for the target arn specified (Service: AmazonSNS; Status Code: 400; Error Code: InvalidParameter; Request ID: 60749365-b72d-5a0e-8eca-deae2ca89839)
HTTP Status Code: 400
AWS Error Code: InvalidParameter
Error Type: Client
Request ID: 60749365-b72d-5a0e-8eca-deae2ca89839
but when I create application and endpoint arns in java it says
{EndpointArn:` arn:aws:sns:us-west-1:891575093309:endpoint/GCM/TestApp/3a1b5884-1533-3997-a819-9f362c3126f7}
{Message Body: {"GCM":"{\"collapse_key\":\"Welcome\",\"data\":{\"message\":\"Hello World!\"},\"delay_while_idle\":true,\"time_to_live\":125,\"dry_run\":false}"}}
{Message Attributes:}
Published!
{MessageId=e5f9452e-09c7-5a94-9cf1-08e597674c00}
but I didn't receive any notifications. Please, anyone who has luckily implemented it...