A Tasker plugin for generating text from Google Gemini API,
built with Tasker Plugins Library.
Build and install on your own, or install from Google Play Store
Firstly, get your Google AI API key from here.
Then
In Tasker,
- Add an action > select action:
Gemini Text Generation - Configuration > put your API key and prompt
- prompt can include Tasker variables
You can pass an image for multimodal generation (text + image):
- In the configuration, set Image Path to one of:
- a file path (e.g.
/sdcard/DCIM/photo.jpg) orfile://URI - a
content://URI (e.g.content://media/external/images/media/42)
- a file path (e.g.
- Tasker variables work here too (e.g.
%photo_path) - Supported formats: JPEG, PNG, WebP, GIF, BMP
The plugin needs its own permission to read images of other apps (Tasker's does not carry over):
tap Allow under Image Path in the configuration, and allow access to all photos.
content:// URIs of other apps' providers can be read only when that app allows it.
When an image path is provided, both the prompt text and the image are sent to the Gemini API together.
| Setting | Description | Default |
|---|---|---|
| System Instruction | Set a role or persona for the model (e.g. "You are a translator") | None |
| Temperature | Controls creativity. 0.0 = deterministic, 2.0 = most creative | 1.0 |
| Max Output Tokens | Maximum length of the generated response | 2048 |
All optional settings support Tasker variables.
When the configured action is triggered successfully,
the generated text will be saved as a Tasker variable named %gemini_text.
This resulting variable can be referenced in following actions or other tasks.
(e.g. sending it as an email, showing it as an Android notification, etc.)
./gradlew assembleDebug- Copy
local.properties.exampletolocal.properties - Fill in your keystore path and credentials
- Build:
./gradlew bundleRelease # AAB for Play Store
./gradlew assembleRelease # APK- Add screenshots for guiding configuration
- Support other Gemini models
- Add tests
- Add an action which generates text from prompt and images
- Add some more useful usages
- Enable R8 minification for smaller release binary
MIT