victordiaz / PHONK

PHONK is a coding playground for new and old Android devices
https://phonk.app
GNU General Public License v3.0
461 stars 25 forks source link

Tasker integration #78

Open thejeshgn opened 4 years ago

thejeshgn commented 4 years ago

Add ability to send and receit data from Tasker. Phonk can look like a plugin for Tasker.

victordiaz commented 4 years ago

Hi @thejeshgn Just out of curiosity, what uses cases can you see?

thejeshgn commented 4 years ago

I have couple of scenes in Tasker. In one of them I wanted to trigger a script in Phonk

victordiaz commented 4 years ago

Hi @thejeshgn

I remembered we can launch PHONK scripts using an intent. For example in ADB we can do something like

adb shell am start -n "io.phonk.extended/io.phonk.runner.AppRunnerActivity" -e "projectFolder" "playground/User\ Projects" -e "projectName" "MyProject"

To launch the script "My Project" inside the "User Projects" folder. Have in mind that I'm using the "extended" version, if you use the normal one you should write io.phonk rather than io.phonk.extended.

If you want to translate this to Tasker, you can use the Send Intent action as follows

phonk_tasker

I hope this can help you out!