Translations by gtranslate.io
The most important for every extension - is Locus Map installed?
The starting point for similar questions are these two classes:
Get list of available versions on your device
LocusUtils.getAvailableVersions(Context ctx);
and check if result contains any LocusVersion objects.
Or if you don't care about LocusVersion (which is good to know, because this object is used later in many functions), you may use simple function
LocusUtils.isLocusAvailable(Context ctx);
and check only true/false result.
If you know LocusVersion you want to check, use following method
LocusInfo locusInfo = ActionTools.getLocusInfo(ctx, lv); if (locusInfo == null) { // problem with receiving information about Locus return false; } else { return locusInfo.isRunning(); }