Class: IGeTui::NotificationTemplate
- Inherits:
-
BaseTemplate
- Object
- BaseTemplate
- IGeTui::NotificationTemplate
- Defined in:
- lib/igetui/template/notification_template.rb
Instance Attribute Summary collapse
-
#is_clearable ⇒ Object
Returns the value of attribute is_clearable.
-
#is_ring ⇒ Object
Returns the value of attribute is_ring.
-
#is_vibrate ⇒ Object
Returns the value of attribute is_vibrate.
-
#logo ⇒ Object
Returns the value of attribute logo.
-
#logo_url ⇒ Object
Returns the value of attribute logo_url.
-
#text ⇒ Object
Returns the value of attribute text.
-
#title ⇒ Object
Returns the value of attribute title.
Attributes inherited from BaseTemplate
#transmission_content, #transmission_type
Instance Method Summary collapse
- #get_action_chain ⇒ Object
- #get_push_type ⇒ Object
-
#initialize ⇒ NotificationTemplate
constructor
A new instance of NotificationTemplate.
Methods inherited from BaseTemplate
#get_push_info, #get_transparent, #set_push_info
Constructor Details
#initialize ⇒ NotificationTemplate
Returns a new instance of NotificationTemplate.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/igetui/template/notification_template.rb', line 6 def initialize @title = '' @text = '' @logo = '' @logo_url = '' @transmission_type = 0 @transmission_content = '' @is_ring = true @is_vibrate = true @is_clearable = true super end |
Instance Attribute Details
#is_clearable ⇒ Object
Returns the value of attribute is_clearable.
4 5 6 |
# File 'lib/igetui/template/notification_template.rb', line 4 def is_clearable @is_clearable end |
#is_ring ⇒ Object
Returns the value of attribute is_ring.
4 5 6 |
# File 'lib/igetui/template/notification_template.rb', line 4 def is_ring @is_ring end |
#is_vibrate ⇒ Object
Returns the value of attribute is_vibrate.
4 5 6 |
# File 'lib/igetui/template/notification_template.rb', line 4 def is_vibrate @is_vibrate end |
#logo ⇒ Object
Returns the value of attribute logo.
3 4 5 |
# File 'lib/igetui/template/notification_template.rb', line 3 def logo @logo end |
#logo_url ⇒ Object
Returns the value of attribute logo_url.
3 4 5 |
# File 'lib/igetui/template/notification_template.rb', line 3 def logo_url @logo_url end |
#text ⇒ Object
Returns the value of attribute text.
3 4 5 |
# File 'lib/igetui/template/notification_template.rb', line 3 def text @text end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/igetui/template/notification_template.rb', line 3 def title @title end |
Instance Method Details
#get_action_chain ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/igetui/template/notification_template.rb', line 19 def get_action_chain # set actionchain action_chain_1 = GtReq::ActionChain.new action_chain_1.actionId = 1 action_chain_1.type = GtReq::ActionChain::Type::Goto action_chain_1.next = 10000 # notification action_chain_2 = GtReq::ActionChain.new action_chain_2.actionId = 10000 action_chain_2.type = GtReq::ActionChain::Type::Notification action_chain_2.title = title action_chain_2.text = text action_chain_2.logo = logo action_chain_2.logoURL = logo_url action_chain_2.ring = is_ring action_chain_2.clearable = is_clearable action_chain_2.buzz = is_vibrate action_chain_2.next = 10010 # goto action_chain_3 = GtReq::ActionChain.new action_chain_3.actionId = 10010 action_chain_3.type = GtReq::ActionChain::Type::Goto action_chain_3.next = 10030 # appStartUp app_start_up = GtReq::AppStartUp.new(android: '', symbia: '', ios: '') # start web action_chain_4 = GtReq::ActionChain.new action_chain_4.actionId = 10030 action_chain_4.type = GtReq::ActionChain::Type::Startapp action_chain_4.appid = '' action_chain_4.autostart = @transmission_type == 1 action_chain_4.appstartupid = app_start_up action_chain_4.failedAction = 100 action_chain_4.next = 100 # end action_chain_5 = GtReq::ActionChain.new action_chain_5.actionId = 100 action_chain_5.type = GtReq::ActionChain::Type::Eoa [action_chain_1, action_chain_2, action_chain_3, action_chain_4, action_chain_5] end |
#get_push_type ⇒ Object
66 67 68 |
# File 'lib/igetui/template/notification_template.rb', line 66 def get_push_type "NotifyMsg" end |