Class: Xmpush::AndroidBuilder

Inherits:
Message
  • Object
show all
Defined in:
lib/xmpush/android_builder.rb

Constant Summary collapse

NOTIFY_TYPE_DEFAULT_ALL =

设置通知类型

-1
NOTIFY_TYPE_DEFAULT_SOUND =

使用默认提示音提示

1
NOTIFY_TYPE_DEFAULT_VIBRATE =

使用默认震动提示

2
NOTIFY_TYPE_DEFAULT_LIGHTS =

使用默认led灯光提示

4
NTF_CENTER_NTF =

通知栏消息

0
PASS_THROUGH_NTF =

透传消息

1

Constants inherited from Message

Message::EXTRA_PREFIX

Instance Attribute Summary collapse

Attributes inherited from Message

#description, #extra, #notify_type, #payload, #restricted_package_name, #time_to_live, #time_to_send, #title

Instance Method Summary collapse

Constructor Details

#initialize(**message) ⇒ AndroidBuilder

Returns a new instance of AndroidBuilder.



15
16
17
18
19
20
# File 'lib/xmpush/android_builder.rb', line 15

def initialize(**message)
  @pass_through = message.delete(:pass_through) || 0
  @notify_id = message.delete(:notify_id) || 0
  super(message)
  # @extra = {sound_url: sound_url, badge: badge}
end

Instance Attribute Details

#notify_idObject

Returns the value of attribute notify_id.



13
14
15
# File 'lib/xmpush/android_builder.rb', line 13

def notify_id
  @notify_id
end

#pass_throughObject

Returns the value of attribute pass_through.



13
14
15
# File 'lib/xmpush/android_builder.rb', line 13

def pass_through
  @pass_through
end