Class: LaunchActivityAction

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

Overview

Category: Applications

Instance Attribute Summary

Attributes inherited from MacroObject

#options, #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.



2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
# File 'lib/ruby-macrodroid.rb', line 2283

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 ⇒ Object



2296
2297
2298
# File 'lib/ruby-macrodroid.rb', line 2296

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