Sha256: 153fa6659bd38e7804e34777b55e1db16e587729b0a0daadc56a07756c531dc6

Contents?: true

Size: 570 Bytes

Versions: 2

Compression:

Stored size: 570 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))
    end
    def pushToAllDevice(title, content, params={})
      self.push_all_device(1, build_simple_message(title, content))
    end

    protected

    def build_simple_message(title,content)
      {
        title: title, content: content, vibrate: 1
      }.to_json
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-for-xinge-0.1.1 lib/xinge/android.rb
ruby-for-xinge-0.1.0 lib/xinge/android.rb