class Xinge::Android
Public Class Methods
new(accessId = nil, secretKey = nil, options = {})
click to toggle source
Calls superclass method
# File lib/xinge/android.rb, line 4 def initialize(accessId = nil, secretKey = nil, options = {}) super end
Public Instance Methods
pushToAllDevice(title, content, params={}, custom_content={})
click to toggle source
# File lib/xinge/android.rb, line 10 def pushToAllDevice(title, content, params={}, custom_content={}) self.push_all_device(1, build_simple_message(title, content, custom_content), params) end
pushToSingleDevice(token, title, content, params={}, custom_content={})
click to toggle source
# File lib/xinge/android.rb, line 7 def pushToSingleDevice(token, title, content, params={}, custom_content={}) self.push_single_device(token, 1, build_simple_message(title, content, custom_content), params) end
Protected Instance Methods
build_simple_message(title, content, custom_content)
click to toggle source
# File lib/xinge/android.rb, line 16 def build_simple_message(title, content, custom_content) { title: title, content: content, vibrate: 1 }.merge(custom_content).to_json end