Class: LaunchActivityAction

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

Overview

Category: Applications

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 inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ LaunchActivityAction

Returns a new instance of LaunchActivityAction.



2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
# File 'lib/ruby-macrodroid.rb', line 2866

def initialize(h={})

  options = {
    application_name: 'Chrome',
    package_to_launch: 'com.android.chrome',
    exclude_from_recents: false,
    start_new: false
  }

  super(options.merge h)

end

Instance Method Details

#to_s(colour: false) ⇒ Object



2879
2880
2881
# File 'lib/ruby-macrodroid.rb', line 2879

def to_s(colour: false)
  'Launch ' + @h[:application_name]
end