Starter application for creating Tasker tasks in JavaScript with taskerjs.
Clone the repository and install the dependencies.
$ git clone --depth=1 git@github.com:benfo/taskerjs-starter.git
$ cd taskerjs-starter
$ npm install
Before deploying the application to your phone, make sure you have installed and correctly configured adb to communicate with your phone.
$ npm run push
Now it is time to configure Tasker.
Add a Task
- Launch Tasker and add a new Task called TaskerJs.
- Add a JavaScript action and set the
Pathfield to point to theindex.jsfile. Locate the file using the magnifying glass button or typeTasker/scripts/taskerjs-starter/index.js.
Add a Profile
- Add a new State profile and search for Power. Keep the default settings.
- For the Enter Task, select TaskerJs from the list of tasks.
- Rename the profile to "Power:Changed".
Test
You can now test the profile.
Plug your phone into a power source to see the message "Hello World" flash on your screen.