Sha256: 5e650dc1084d263a6d459c51c44bf7cf46d1eeaa1c2dd322dc22d3ea0ed453a6
Contents?: true
Size: 586 Bytes
Versions: 1
Compression:
Stored size: 586 Bytes
Contents
require 'xinge/base' module Xinge class Android < Base def initialize(accessId = nil, secretKey = nil, options = {}) super end def pushToSingleDevice(token, title, content, params={}) self.push_single_device(token, 1, build_simple_message(title, content), params) end def pushToAllDevice(title, content, params={}) self.push_all_device(1, build_simple_message(title, content), params) end protected def build_simple_message(title,content) { title: title, content: content, vibrate: 1 }.to_json end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby-for-xinge-0.1.2 | lib/xinge/android.rb |