Sha256: d46a32b2b28dfed93fde81e17d20d6e5088d0e02ad4164eecfb20a66da8a5545
Contents?: true
Size: 516 Bytes
Versions: 5
Compression:
Stored size: 516 Bytes
Contents
module PushToSNS class AndroidPushNotification < BasicPushNotification DEFAULT_MESSAGE = "Android Push Notification" def message { GCM: { data: default_payload.deeper_merge(payload) }.to_json } end private def default_payload basic_message = { message: payload[:message] || DEFAULT_MESSAGE } basic_message[:smallIcon] = payload[:badge] if payload[:badge] basic_message[:sound] = payload[:sound] if payload[:sound] basic_message end end end
Version data entries
5 entries across 5 versions & 1 rubygems