android - Getting Blank messages in my app from AWS SNS. -


i want send push notification individual using android gcm. have created app in sns. using aws-sdk v1.4 ruby.

when send through amazon web interface receive messages, when publish through using code below, blank messages. right message format send?

sns = aws::sns::client.new endpoint = sns.create_platform_endpoint(platform_application_arn:my_token) sns.publish(target_arn:endpoint:endpoint_arn, message: "gcm:{data:{message:"gcm:{data:{message:'hello'}") 

please help. tia

the message should valid json string if want publish message gcm. can use to_json serialize hash object json. here article using aws sdk ruby http://blog.tryneighborly.com/amazon-sns-for-apns-on-rails/.

for more information amazon sns:


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -