NAME

Android::ElectricSheep::Automator::Plugins::Base - The great new Android::ElectricSheep::Automator::Plugins::Base!

VERSION

Version 0.03

SYNOPSIS

This is the parent class of all Android::ElectricSheep::Automator plugins. You do not need to override anything except perhaps the constructor if you are going to be needing extra input parameters to it. There is already one plugin provided Android::ElectricSheep::Automator::Plugins::Viber which can serve as an example for creating new plugins. It is as simple as this:

package Android::ElectricSheep::Automator::Plugins::MyNewPlugin;

use parent 'Android::ElectricSheep::Automator::Plugins::Base';

sub new {
        my ($class, $params) = @_;  
        my $self = $class->SUPER::new({
                %$params,
                'child-class' => $class,
        });
        # add some extra internal fields, e.g. the name of the app
        # we are dealing with
        $self->{'_private'}->{'appname'} = 'com.viber.voip';

        return $self;
}
# new methods
# getter of the app name
sub appname { return $_[0]->{'_private'}->{'appname'} }
# any methods for controlling the app, e.g.
sub open_viber_app {
    my ($self, $params) = @_;
    ...
}
...

Then use the plugin as:

use Android::ElectricSheep::Automator::Plugins::MyNewPlugin;
my $vib = Android::ElectricSheep::Automator::Plugins::MyNewPlugin->new({
  configfile=>'config/plugins/viber.conf',
  'device-is-connected' => 1
});
$vib->open_viber_app();
$vib->send_message({recipient=>'My Notes', message=>'hello%sMonkees'});
$vib->close_viber_app();

AUTHOR

Andreas Hadjiprocopis, <bliako at cpan.org>

BUGS

Please report any bugs or feature requests to bug-android-adb-automator at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Android-ADB-Automator. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Android::ElectricSheep::Automator::Plugins::Base

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2025 by Andreas Hadjiprocopis.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)