Stypox / dicio-android

Dicio assistant app for Android
GNU General Public License v3.0
790 stars 72 forks source link

skill request: broadcast user defined intent at runtime #64

Open sudomain opened 2 years ago

sudomain commented 2 years ago

I'd like to integrate Dicio into my personal automation system which primarily uses KeyMapper and Termux.

KeyMapper can receive intents that are sent containing a UUID and I want Dicio to send them. As the UUIDs are randomly generated at runtime, I'd need a text box in Dicio to copy the UUIDs to, rather than hard coding them. Additionally, #62 Would probably be a prerequisite to this skill as it'd require having a pronouncable name(s) for the intents.

Running commands in Termux would require requesting a permission and a few other steps

Additionally both KeyMapper and Termux (through am) can send service, activity, and broadcast intents. Is it possible to start Dicio's "listening" in the background (I.e. without starting the main Dicio activity)?

Thank you

Stypox commented 2 years ago

I'd need a text box in Dicio to copy the UUIDs to, rather than hard coding them. Additionally, https://github.com/Stypox/dicio-android/issues/62 Would probably be a prerequisite to this skill as it'd require having a pronouncable name(s) for the intents.

That wouldn't be a problem. You can create a KeyMapper skill that has a preference screen that allows the user to add UUIDs to send. In order to have a pronounceable name for intents, even though #62 would be the best solution, for now you could just associate a name to each UUID. Then you could create a sentences file for the skill containing e.g. the sentence run|execute the command .command., and the .command. capturing group would be compared against UUID names.

Running commands in Termux would require requesting a permission and a few other steps

That would also not be a problem since Dicio supports skills that require permissions.

Is it possible to start Dicio's "listening" in the background (I.e. without starting the main Dicio activity)?

Currently not, see (in part) #48, though a separate issue would need to be created