Class: Xmpush::AndroidBuilder
- 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
Instance Attribute Summary collapse
-
#notify_id ⇒ Object
Returns the value of attribute notify_id.
-
#pass_through ⇒ Object
Returns the value of attribute pass_through.
Attributes inherited from Message
#description, #extra, #notify_type, #payload, #restricted_package_name, #time_to_live, #time_to_send, #title
Instance Method Summary collapse
-
#initialize(**message) ⇒ AndroidBuilder
constructor
A new instance of AndroidBuilder.
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(**) @pass_through = .delete(:pass_through) || 0 @notify_id = .delete(:notify_id) || 0 super() # @extra = {sound_url: sound_url, badge: badge} end |
Instance Attribute Details
#notify_id ⇒ Object
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_through ⇒ Object
Returns the value of attribute pass_through.
13 14 15 |
# File 'lib/xmpush/android_builder.rb', line 13 def pass_through @pass_through end |