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 = false 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 actionChain1 = GtReq::ActionChain.new actionChain1.actionId = 1 actionChain1.type = GtReq::ActionChain::Type::Goto actionChain1.next = 10000 # notification actionChain2 = GtReq::ActionChain.new actionChain2.actionId = 10000 actionChain2.type = GtReq::ActionChain::Type::Notification actionChain2.title = title actionChain2.text = text actionChain2.logo = logo actionChain2.logoURL = logo_url actionChain2.ring = is_ring actionChain2.clearable = is_clearable actionChain2.buzz = is_vibrate actionChain2.next = 10010 # goto actionChain3 = GtReq::ActionChain.new actionChain3.actionId = 10010 actionChain3.type = GtReq::ActionChain::Type::Goto actionChain3.next = 10030 # appStartUp appStartUp = GtReq::AppStartUp.new(android: '', symbia: '', ios: '') # start web actionChain4 = GtReq::ActionChain.new actionChain4.actionId = 10030 actionChain4.type = GtReq::ActionChain::Type::Startapp actionChain4.appid = '' actionChain4.autostart = @transmission_type == 1 actionChain4.appstartupid = appStartUp actionChain4.failedAction = 100 actionChain4.next = 100 # end actionChain5 = GtReq::ActionChain.new actionChain5.actionId = 100 actionChain5.type = GtReq::ActionChain::Type::Eoa [actionChain1, actionChain2, actionChain3, actionChain4, actionChain5] end |
#get_push_type ⇒ Object
66 67 68 |
# File 'lib/igetui/template/notification_template.rb', line 66 def get_push_type "NotifyMsg" end |