Options
All
  • Public
  • Public/Protected
  • All
Menu

Module plugins

Auto.js Pro provides a way to load plugins, which allows users to write plugins with activities, services, C/C++ libraries, etc. and install them to Android devices. Plugins can be loaded and called by Auto.js Pro.

A plugin is an independent apk file, which can be installed separately. After installing the plugin, it can be loaded and called by Auto.js Pro.

Official supported plugins include:

If you want to develop your own plugin (requires Android knowledge), see How to develop a plugin.

For now, plugins need to be installed separately for released apk.

Index

Functions

Functions

load

  • load(packageName: string): any
  • Load a plugin and return the module.exports object exported by the plugin.

    If the plugin is not installed or does not exist, throw a PluginLoadException.

    example
    "nodejs";
    const plugins = require("plugins");
    const ffmpeg = plugins.load("org.autojs.plugin.ffmpeg");
    console.log(ffmpeg.inProcess.exec('-i /path/to/mp4.mp4 /path/to/mp3.mp3'));
    

    Parameters

    • packageName: string

      plugin package name

    Returns any

    plugin exported object

unload

  • unload(packageName: string): boolean
  • Unload a plugin. Using the plugin exported object is an undefined behavior after unloading.

    Parameters

    • packageName: string

    Returns boolean

unloadAll

  • unloadAll(): void
  • Unload all plugins. Using the plugin exported object is an undefined behavior after unloading.

    Returns void