Skip to content

meinside/android-tasker-gemini-plugin

Repository files navigation

Tasker Gemini Plugin

A Tasker plugin for generating text from Google Gemini API,

built with Tasker Plugins Library.

Installation

Build and install on your own, or install from Google Play Store

Configuration

Firstly, get your Google AI API key from here.

Then

For text generation with prompt text

In Tasker,

  • Add an action > select action: Gemini Text Generation
  • Configuration > put your API key and prompt

For text generation with prompt text and images

You can pass an image file path for multimodal generation (text + image):

  • In the configuration, set Image Path to a file path (e.g. /sdcard/DCIM/photo.jpg)
  • Tasker variables work here too (e.g. %photo_path)
  • Supported formats: JPEG, PNG, WebP, GIF, BMP

When an image path is provided, both the prompt text and the image are sent to the Gemini API together.

Optional settings

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.

Usage

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.)

Building

Debug

./gradlew assembleDebug

Release

  1. Copy local.properties.example to local.properties
  2. Fill in your keystore path and credentials
  3. Build:
./gradlew bundleRelease  # AAB for Play Store
./gradlew assembleRelease # APK

Todos / Improvements

  • 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

License

MIT

About

Tasker Plugin for generating text with Gemini API

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages