Introduction
This guide takes you from an empty project to your own indicator showing up on the Velitask Telemitri canvas. It is deliberately practical: what to get, what to install, what to connect, what to build, and where to click. The exact contract of the SDK classes is not covered here — for that there is JavaDoc and the reference-plugin documentation (see Next steps).
Telemitri is deliberately open — to give developers maximum freedom. All project data is stored in a local SQLite database, and the plugin works with it directly: it reads source and sensor data, and it can create its own tables to store its own analytics.
The source code of all official plugins is open
The code of plugin-official — every plugin shipped with Telemitri — is fully open. You can:
- study it and use it as a basis for your own indicators;
- copy and modify it however you like, for your own needs;
- extend and evolve the existing indicators;
- send improvements via pull request — they are welcome.
Don't start from scratch: fork a working plugin and reshape it for yourself.
Your fork replaces the official plugin. A plugin is identified by its ID (UID). If your build keeps the same UID as a built-in plugin, Telemitri loads only one of them: the one with the higher version (
getVersion()), and with equal versions — the one with the newer JAR file. So don't set your fork's version below the built-in plugin's version. A new build is picked up after the application restarts.
Plugin and indicator
A plugin is a JAR file that adds one or more indicators to Velitask Telemitri. Telemitri finds plugins in configured folders and loads them when the application starts. A new or changed plugin is picked up after a restart.
An indicator is a visual component drawn on top of the frame in a project (in the composition Telemitri calls a Mixel). The indicator reads source data — speed, distance, elevation, coordinates, time — and renders it the way you programmed it: a speedometer, text, a chart, a map. The user adds the indicator to the canvas, adjusts its properties, and sees the result right in the preview.
A single plugin can contain several indicators. The minimal working plugin is one plugin class (the entry point) plus one indicator class.
Where things live
| What | Where | Why you need it |
|---|---|---|
| Velitask SDK | github.com/velitask/velitask-sdk, binaries on JitPack | The set of contracts (interfaces) your plugin compiles against. Added as a dependency, not bundled inside the plugin. |
| plugin-example | github.com/velitask/plugin-example | A minimal working plugin. The recommended starting point — fork it and reshape it for yourself. |
| plugin-official | github.com/velitask/plugin-official | The official plugin shipped with Telemitri (speedometer, distance, slope chart, map, etc.). The canonical reference for non-trivial indicators. |
| JavaDoc | https://javadoc.jitpack.io/com/github/velitask/velitask-sdk/<version>/javadoc/, e.g. 1.1.147 | The exact contract of every SDK class and method. In the IDE — hover or Ctrl+Q on any SDK class. |
| Telemitri | velitask.com | The application your indicator will run in (Velitask Telemitri). Must be installed. |
What we'll build
In this course you will:
- install the tools and grab the reference project — Prerequisites;
- connect the SDK and build a JAR — Build and connect the SDK;
- install the plugin into Telemitri and put the indicator on the canvas — Install and run;
- set up a build after which the application restarts by itself with the new version of the plugin — Development loop;
- learn where to find API details when you want more — Next steps.
By the end you'll have your own indicator on the canvas and a working loop where a code change reaches the application with a single build command.
Next: Prerequisites.
Prerequisites
Before building a plugin, set up your environment and grab the reference project.
Tools
| Tool | Version | Why |
|---|---|---|
| JDK | 21 or newer | Plugins compile against Java 21. Any OpenJDK build works (Temurin, Liberica, Zulu, etc.). |
| Gradle | 8+ | The build system. Install it on your machine — see Installing Gradle below. |
| IDE | — | Optional but convenient. Visual Studio Code or NetBeans with Gradle and Java 21 support will do. |
| Velitask Telemitri | current | The application the plugin will run in. Download and install it from velitask.com. |
Check that Java is visible in the console:
java -version
The version must be 21 or higher.
Installing Gradle
The full official guide is at gradle.org/install. In short, by platform:
- Windows — easiest via a package manager:
- Chocolatey:
choco install gradle - Scoop:
scoop install gradle - or manually: download the ZIP from gradle.org/releases, unpack it, and add the
binfolder to yourPATH(see the steps in the official guide).
- Chocolatey:
- macOS / Linux — via SDKMAN:
sdk install gradle, orbrew install gradle(macOS, Homebrew).
Check the installation:
gradle -v
The Gradle version must be 8 or higher, and the JVM line must show Java 21+.
The reference project also contains a Gradle Wrapper (
gradlew/gradlew.bat) that downloads the required Gradle version itself. If you prefer the wrapper, replacegradlewith./gradlew(orgradlew.baton Windows) in all commands below.
The reference project
Don't start from an empty project — grab plugin-example. It's a minimal working plugin with one indicator, a properly configured build, a manifest, and localization. You'll reshape it for yourself afterward.
Fork the repository on GitHub and clone your fork, or clone it directly:
git clone https://github.com/velitask/plugin-example.git
cd plugin-example
Verifying the environment
Build the reference project as-is — this confirms the JDK and Gradle are set up correctly before you change anything:
gradle jar
The build should finish successfully, and a JAR file should appear in build/libs/. If something fails here, the problem is in the environment (most often the wrong Java version) and must be fixed before the next step.
Next: Build and connect the SDK.
Build and connect the SDK
Here we go over what, in a plugin project, is responsible for connecting the SDK and for making Velitask Telemitri recognize the built JAR. In plugin-example all of this is already set up — below we explain what each fragment does, so you can reproduce it in your own project.
Connecting the SDK
The SDK is published through JitPack. In build.gradle you need the JitPack repository and the SDK dependency:
plugins {
id 'java'
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
compileOnly 'com.github.velitask:velitask-sdk:1.1.+'
compileOnly 'org.json:json:20250107'
}
The SDK contains everything that only Telemitri has: the plugin contracts and the Velitask libraries whose types appear in its API. Third-party libraries that appear in the SDK API are added as a regular dependency from Maven Central: this is org.json — its JSONObject class is used by the settings save methods (toJSON, fromJSON). Use the version given above — the application uses it.
The key point is compileOnly. The SDK is needed only for compilation: at runtime it is provided by the Telemitri application itself. If you bundle the SDK inside the plugin JAR (implementation instead of compileOnly), the classes get duplicated and the plugin won't load. So the SDK and org.json are always compileOnly: at runtime the application provides them.
1.1.+ takes the latest version of the 1.1 branch. For a reproducible build, replace it with a specific version from Releases.
The JAR manifest
Telemitri finds a plugin by an attribute in the JAR manifest. Without it, the application won't recognize it as a plugin. It's configured in the jar task:
jar {
archiveBaseName = 'my-indicator'
manifest {
attributes(
'Velitask-Plugin-Class': 'com.example.myplugin.MyPlagin'
)
}
}
Velitask-Plugin-Class is the only attribute Telemitri reads: the fully qualified name of the plugin's entry-point class. This class must implement the IPlagin interface and have a public no-argument constructor: Telemitri creates the plugin through it on load.
The entry point and the indicator itself are your plugin's code; in plugin-example they're already written, and how they work is covered in that project's documentation (see Next steps). At this step it's enough to know: the class from Velitask-Plugin-Class implements IPlagin and returns a list of indicators.
Localizing strings
The plugin's texts (indicator and setting names) are stored in properties files in the src/main/resources/localization/ folder:
src/main/resources/localization/strings.properties ← default (English)
src/main/resources/localization/strings_ru.properties ← Russian
The files are UTF-8 encoded. In the indicator code a string is taken by key: localized("MyPlugin.Indicator.clock.title"). There is no need to register the files: when loading the plugin, Telemitri itself finds all localization/*.properties files in the JAR and picks the language by the file name suffix (_ru, _de, …).
The keys are shared by the whole application, so start them with a unique prefix of your plugin (plugin-example uses PluginExample.). If a key is missing, the user sees the key itself.
Building the JAR
gradle jar
The result is build/libs/<archiveBaseName>-<version>.jar. That's the finished plugin: a single file you'll hand to Telemitri in the next step.
Next: Install and run.
Install and run
The JAR is built — now hand it to Velitask Telemitri and put the indicator on the canvas.
1. Where to put the plugin
Telemitri loads plugins from configured folders. There are two ways.
Option A — the standard plugins folder
Copy the JAR into the user plugins folder. The application connects it on first launch:
| OS | Folder |
|---|---|
| Windows | %USERPROFILE%\.velitask\telemitri\plugins\ |
| macOS | ~/.velitask/telemitri/plugins/ |
| Linux | ~/.velitask/telemitri/plugins/ |
Option B — point to the build folder (handy during development)
To avoid copying the JAR after every build, point Telemitri at the build/libs folder itself:
- Open Tools → Settings....
- Select the Plugins category.
- In the Plugin folders list, click Add… and choose your project's
build/libsfolder.
Here you can also reorder the folder list (Up / Down) and remove folders from it (Remove).
Restarting the application
Plugins are loaded once — when the application starts. Telemitri watches the plugin folders in the background and notices a new, changed, or removed JAR, but applies the changes only after a restart:
- a Plugins changed notification appears with a Restart button;
- in the Tools → Plugins... window such a plugin is marked "new — after restart", "changed — after restart", or "removed — after restart", with a Restart application button next to it.
This applies to both options: a copied JAR and a JAR in an added build folder.
2. Open a canvas
An indicator is drawn on top of the frame in a Mixel — the source's composition. To get a canvas:
- Create or open a project: File → New Project… or File → Open Project….
- Add a source (video, GPX, etc.) to the project if there isn't one yet.
- Double-click the source in the Project panel to open its editor — the Mixel canvas appears in the center.
3. Put the indicator on the canvas
- Open the Indicators panel (View → Indicators; it is on the left by default).
- Find your indicator by name in the search box.
- Drag it from the list onto the canvas — or open the indicator's context menu and choose Add to mixel.
The indicator appears on the canvas as a new layer. Select it in the Layers panel — on the right, in the Properties panel, its settings appear (the very ones declared in the indicator's code).
Don't see your indicator in the list? Check that the JAR is in a connected folder, built without errors, and that the application was restarted after it appeared. The plugin's status is shown in the Tools → Plugins... window. Common causes — in the "If something doesn't work" section of Next steps.
After the indicator appears on the canvas, set up a convenient development loop: a single build command will install the plugin and restart the application.
Next: Development loop.
Development loop
Once the indicator is on the canvas, the main pain is the "rebuild → copy the JAR → restart Velitask Telemitri" cycle. Plugins are loaded only when the application starts, so a restart can't be avoided, but you can hand it over to the build. This is what the Dev API is for — a local HTTP address; on a request to it, the running application restarts and loads the fresh JAR.
1. Enable the Dev API (once)
- Open Tools → Settings... and select the Plugins category.
- In the Dev API (HTTP) section, enable Enable local API for plugin reload (off by default).
- The default port is
19809(you can change it).
The request address (the settings window shows it too):
GET http://127.0.0.1:19809/api/plugins/v1/plugin/reload/{uid}
{uid} is your plugin's identifier (the one returned by getUID()). Requests are accepted only from this computer (127.0.0.1). In response to a request, the application restarts as a whole and loads all plugins again — a single plugin can't be reloaded without a restart.
2. A Gradle task to build, install, and restart
Add a task to build.gradle that builds the JAR, places it in the plugins folder, and sends a request to the Dev API (put your plugin's identifier into uid):
tasks.register('installAndReload') {
group = 'velitask'
description = 'Build jar, install it, and restart a running Telemitri'
dependsOn 'jar'
doLast {
def home = System.getProperty('user.home')
def pluginsDir = file("${home}/.velitask/telemitri/plugins")
pluginsDir.mkdirs()
def srcJar = jar.archiveFile.get().asFile
def dstJar = new File(pluginsDir, srcJar.name)
dstJar.bytes = srcJar.bytes
logger.lifecycle("[installAndReload] installed: ${dstJar}")
def port = (project.findProperty('devApiPort') ?: '19809') as int
def uid = 'com.example.myplugin' // your plugin uid (same as getUID())
def url = new URL("http://127.0.0.1:${port}/api/plugins/v1/plugin/reload/${uid}")
try {
def conn = (HttpURLConnection) url.openConnection()
conn.requestMethod = 'GET'
conn.connectTimeout = 3000
conn.readTimeout = 65000
logger.lifecycle("[installAndReload] ${url} → ${conn.responseCode}")
} catch (Throwable ex) {
logger.warn("[installAndReload] restart skipped: ${ex.message} (is Telemitri running? Dev API enabled?)")
}
}
}
tasks.named('build').configure { finalizedBy 'installAndReload' }
The last line runs the task after every build: the IDE's Build button runs gradle build, and therefore installAndReload too.
If you have added your project's build/libs folder in the settings (see Install and run), there's no need to copy the JAR — sending the request is enough. In that case remove the lines with pluginsDir, srcJar, and dstJar from the task.
3. The daily loop
- Telemitri is running, your indicator is on the canvas.
- You edit the code in the IDE.
- You hit Build (or
gradle buildin the console). - Telemitri restarts and loads the new version of the plugin.
If Telemitri isn't running or the Dev API is off, the task simply places the JAR and the request is skipped; the build won't fail. The new version is picked up the next time the application starts.
A restart closes the application the same way as a regular exit. If the application can't restart by itself, it tells you so — then close it and open it again manually.
Next: Next steps.
Next steps
Your own indicator on the canvas, a working "build — the application restarts" loop — the foundation is ready. Next comes the substantive part: what the indicator shows and how it looks. This documentation is a general guide to the plumbing; API details and techniques live in three places.
Reference plugins
- plugin-example — the minimal plugin you forked. Its code and wiki break down the "skeleton": the plugin class, the indicator, declaring properties, localization, the DB schema. The best starting point when you need to understand "how it works in the small".
- plugin-official — the official plugin shipped with Velitask Telemitri (speedometer, distance, slope chart, map, etc.). The canonical reference for non-trivial indicators: reading sensors, drawing charts and maps, skins, figures. Look at it when your indicator outgrows "hello world".
JavaDoc
The exact contract of every SDK class and method is in the JavaDoc:
- in the IDE — hover or
Ctrl+Qon any SDK class; - online, after a release is published to JitPack:
https://javadoc.jitpack.io/com/github/velitask/velitask-sdk/<version>/javadoc/, e.g. 1.1.147.
JavaDoc is the primary source for signatures and behavior. Conceptual overviews (this course, the plugin wikis) complement it — they don't replace it.
What to look for by task
| I want to… | Where to look |
|---|---|
| understand the plugin entry point, version, list of indicators | IPlagin (JavaDoc) + plugin-example |
| draw an indicator and declare settings | IIndicator / Indicator (JavaDoc) + plugin-example |
| add user properties (color, font, text template, SVG) | the properties package (JavaDoc) + plugin-official |
| read source data (speed, distance, coordinates) | ISource / sensors (JavaDoc) + plugin-official |
| have the plugin's own database | PluginDatabase (JavaDoc) + plugin-example |
| localize strings | localization in plugin-example |
If something doesn't work
- The plugin didn't appear in the indicator list — check that the JAR is in a connected folder, the manifest contains
Velitask-Plugin-Class, the named class implementsIPlaginand has a public no-argument constructor, and the application was restarted after the JAR was installed. The plugin's status is shown in the Tools → Plugins... window. - The plugin didn't load / an error on load — Telemitri checks the plugin's bytecode against a whitelist of allowed APIs. If the plugin refers to classes outside the list — network (
java.net), files (java.io,java.nio.file,java.nio.channels), launching processes (Runtime,ProcessBuilder), internal JDK classes (sun.*,jdk.internal.*) or internal SDK classes (com.velitask.sdk.internal) — loading is rejected. Allowed are the classes of the SDK and of the libraries that are part of its API, plusjava.lang,java.util,java.math,java.time,java.text,java.nio.charset,java.awt,org.json, andorg.slf4j. - Fresh edits aren't applied — a changed plugin is picked up only after the application restarts. If you use the
installAndReloadtask, make sure the Dev API is on and the build output contains a line with the application's response (see Development loop).
Back to the start: Introduction · Home.
Migrating from SDK 1.0 to 1.1
SDK 1.1 is not compatible with 1.0: a plugin built against 1.0.91-beta has to be moved to the new indicator and property contract. This page is the step-by-step procedure. The full list of changes is in the changelog of release 1.1.131-beta on the Releases page.
1. Update the dependency
dependencies {
compileOnly 'com.github.velitask:velitask-sdk:1.1.+'
compileOnly 'org.json:json:20250107'
}
The 1.0.+ range does not reach version 1.1 — it has to be replaced explicitly. The second line is the third-party org.json library: its JSONObject class appears in the SDK API, but it is not part of the SDK (see Building and connecting the SDK).
2. The indicator context comes from the frame slice
Previously an indicator received the player and the canvas separately, and properties read their current value themselves. Now an indicator receives one frame object — FrameContext — and passes it to every property. This way all properties of one frame see consistent values.
// before (1.0)
@Override
public IndicatorContext createContext(IndicatorContext.Player player, IndicatorContext.Canvas canvas) {
return new MyContext(player, canvas);
}
public class MyContext extends IndicatorContext {
public final ColorProperty.ColorContext color;
public MyContext(Player player, Canvas canvas) {
super(player, canvas);
color = mColor.createContext();
}
}
// after (1.1)
@Override
public IndicatorContext createContext(FrameContext frame) {
return new MyContext(frame);
}
public class MyContext extends IndicatorContext {
public final ColorProperty.ColorContext color;
public MyContext(FrameContext frame) {
super(frame);
color = mColor.createContext(frame);
}
}
What to change:
- the
createContextsignature in every indicator; - the indicator context constructor:
super(frame); - for every property —
createContext(frame)instead ofcreateContext(); a value without a context —mX.get(frame); - the player and the canvas —
frame.playerandframe.canvas.
If you have your own property subclasses or property contexts:
- the
bindFromLive(),bindSnapshot(...),unbindSnapshot()methods are removed — remove the overrides; - a nested context constructor takes the frame:
protected MyContext(IFrameValues frame), withsuper(frame)inside; - your own
IPropertyItemimplementation must implementT get(IFrameValues frame).
3. Sensors — read through the property context
Previously an indicator converted the frame time to the sensor time itself and queried values from the property. Now the sensor context does this.
// before (1.0)
long rawTime = mDistanceSensor.convertToRawTime(ctx.player.time);
if (ctx.player.isPreview) {
rawTime = mDistanceSensor.clampToSensorRange(rawTime);
}
DistanceSensorAtom atom = mDistanceSensor.queryAtom(rawTime);
DistanceSensorAtom last = mDistanceSensor.queryLast();
// after (1.1): in the indicator context — distance = mDistanceSensor.createContext(frame);
DistanceSensorAtom atom = ctx.distance.queryAtom();
DistanceSensorAtom last = ctx.distance.queryLast();
The sensor context (SensorProperty.SensorContext, formerly SensorAtomContext) converts the frame time to the sensor time itself and, when the frame is drawn without waiting for data (frame.player.isPreview: the editor player and source previews), clamps it to the sensor range. For GeoSensorProperty, the approximateZoom(int) and queryLandBounds() methods have also moved to the context — GeoSensorContext.
4. SVG properties
SvgProperty.createContext() is replaced by createContext(frame):
bgSvg = mBgSvg.createContext(frame);
5. Maps: types moved to org.abricos.geo
The methods of MapTilesProperty, MapVectorProperty, MapPlacesProperty are unchanged; only the result types changed. It is enough to replace imports and names:
Before (com.velitask.sdk.*) | After |
|---|---|
osm.OSMTile | org.abricos.geo.tile.Tile |
vector.OSMVectorTile | org.abricos.geo.vector.VectorTile |
vector.OSMFeature | org.abricos.geo.vector.Feature |
vector.OSMGeometryType | org.abricos.geo.vector.GeometryType |
vector.OSMDataTypes | org.abricos.geo.vector.VectorDataTypes |
Map loading registries, sources, statuses and settings (OSMTileSourceRegistry, IOSMTileSource, getStatus() and others) are internal application machinery and are not available to plugins.
6. Removed types
| Removed | What to use |
|---|---|
meteo, ga, watt sensors (SensorType.METEO/GA/WATT, their atoms, interfaces and properties) | — |
state.old_Time, state.old_Period | the MILLS_PER_* constants — in org.abricos.core.state.Time |
the state.temp package | — |
Localization(String, Locale), Localization(LocalizedManager), Localization.setInstance | Localization.instance() |
ColorState.getFXColor(), ColorState.set(javafx.scene.paint.Color) — the SDK does not depend on JavaFX | ColorState.get() / set(java.awt.Color) |
the IndicatorContext.Player(Period, long, boolean) constructor | the constructors with speed (and, if needed, outTime, sourceId) |
If you store SourceType by number (ordinal()), switch to the constant name: the order of the constants has changed.
7. Plugin database
If the plugin keeps its own tables (getDbVersion() > 0):
create.sqlis the full schema snapshot of the current version; a new database is created by it alone;- every schema change is made in one commit: update
create.sql, addupgrade-N.sql(migration fromN-1toN) and bumpgetDbVersion(); a releasedupgrade-N.sqlis never edited; - if the plugin database cannot be upgraded, the plugin is detached from the project and an entry is written to the application log;
- if the plugin works with the database through
org.abricos.core.db.DbProvider: inside anexecute/transactioncallback use only theConnectionpassed in, and get the id afterINSERTviagetGeneratedKeys().
8. Verification
Build the plugin (gradle build) — the compiler shows every place still on the 1.0 API. Then install the plugin and check the indicator on the canvas (see Install and run).