Use data channel instead of notification, so the notification can get delivered and intercepted client-side
This commit is contained in:
parent
b037dccd43
commit
4833662415
1 changed files with 1 additions and 4 deletions
|
@ -36,12 +36,9 @@ class Notification < ActiveRecord::Base
|
||||||
n = Rpush::Gcm::Notification.new
|
n = Rpush::Gcm::Notification.new
|
||||||
n.app = Rpush::Gcm::App.find_by_name("tappb")
|
n.app = Rpush::Gcm::App.find_by_name("tappb")
|
||||||
n.registration_ids = user.android_device_registration_tokens.all.map{|r| r.token}
|
n.registration_ids = user.android_device_registration_tokens.all.map{|r| r.token}
|
||||||
n.data = { message: message }
|
n.data = { body: message, title: "Tabbp notification" }
|
||||||
n.priority = 'high'
|
n.priority = 'high'
|
||||||
n.content_available = true
|
n.content_available = true
|
||||||
n.notification = { body: message,
|
|
||||||
title: "Tabbp notification",
|
|
||||||
}
|
|
||||||
n.save!
|
n.save!
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue