Class: MessageDialogAction

Inherits:
NotificationsAction show all
Defined in:
lib/ruby-macrodroid/actions.rb

Overview

Category: Notifications

Instance Attribute Summary

Attributes inherited from Action

#constraints

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Action

#invoke

Methods included from ObjectX

#action_to_object, #object_create, #varify

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ MessageDialogAction

Returns a new instance of MessageDialogAction.



1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
# File 'lib/ruby-macrodroid/actions.rb', line 1968

def initialize(h={})

  options = {
    secondary_class_type: 'MessageDialogAction',
    ringtone_name: 'Default',
    notification_text: '',
    notification_subject: '',
    macro_guid_to_run: -0,
    notification_channel_type: 0,
    image_resource_id: 0,
    overwrite_existing: false,
    priority: 0,
    ringtone_index: 0,
    icon_bg_color: -1762269,
    run_macro_when_pressed: false
  }

  super(options.merge h)

end

Instance Method Details

#to_s(colour: false, indent: 0) ⇒ Object



1989
1990
1991
# File 'lib/ruby-macrodroid/actions.rb', line 1989

def to_s(colour: false, indent: 0)
  'Display Dialog' + "\n  Battery at: [battery]"
end