nill nill - 3 months ago 26
Android Question

How to launch url on "click_action" from GCM?

I am sending the following notification in a third part app using Amazon SNS and c#:

{ "collapse_key": "demo","default": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", "GCM":"{\"notification\":{\"body\":\"Check out these awesome deals! I said: Check out these awesome deals!\",\"title\":\"test\",\"click_action\":\"\"}}" }

I'm trouble with two problems:

  1. I need that the app goes open the link on click action, only using the notification. Is it possible?

  2. The notification, in Android, is always showing one line of text. Can I configure the amount of lines that it displays in the message?

Can anyone help me?

Thanks a lot.


When you implement Notifications, you can just set the appropriate click event depending on your use case. So yes, its possible.

I'm not sure about configuring multiple lines, but you can try escaping new lines of the message (though I think its possible).