User Tools

Site Tools


manual:advanced:locus_api:information_about_locus

Information about Locus

The most important for every extension - is Locus Map installed?

The starting point for similar questions are these two classes:

Basic tasks

Is Locus installed?

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.

Is Locus running?

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();
    }
manual/advanced/locus_api/information_about_locus.txt · Last modified: 2015/09/07 17:49 by mstupka