This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| manual:advanced:locus_api:information_about_locus [2015/05/21 15:25] – mstupka | manual:advanced:locus_api:information_about_locus [2026/11/27 10:35] (current) – removed mstupka | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Information about Locus ====== | ||
| - | Most important for every extension - //is Locus installed?// | ||
| - | |||
| - | __Starting point for similar questions are two classes__ | ||
| - | |||
| - | * [[https:// | ||
| - | * [[https:// | ||
| - | |||
| - | ===== Basic tasks ===== | ||
| - | |||
| - | ==== Is Locus installed ==== | ||
| - | |||
| - | Get list of available versions on your device | ||
| - | <code java> | ||
| - | LocusUtils.getAvailableVersions(Context ctx); | ||
| - | </ | ||
| - | |||
| - | and check if result contains any // | ||
| - | |||
| - | Or if you don't care about // | ||
| - | |||
| - | <code java> | ||
| - | LocusUtils.isLocusAvailable(Context ctx); | ||
| - | </ | ||
| - | |||
| - | and check only // | ||
| - | |||
| - | ==== Is Locus running ==== | ||
| - | |||
| - | If you know // | ||
| - | |||
| - | <code java> | ||
| - | LocusInfo locusInfo = ActionTools.getLocusInfo(ctx, | ||
| - | if (locusInfo == null) { | ||
| - | // problem with receiving information about Locus | ||
| - | return false; | ||
| - | } else { | ||
| - | return locusInfo.isRunning(); | ||
| - | } | ||
| - | </ | ||