aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/apps/cache/GccApp.java
blob: 44239770e0c376eef257bf08b02bafa606b7e6b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package cgeo.geocaching.apps.cache;

import cgeo.geocaching.R;
import cgeo.geocaching.utils.ProcessUtils;

import android.content.Intent;

public class GccApp extends AbstractGeneralApp {
    private static final String PACKAGE = "eisbehr.gcc";
    private static final String PACKAGE_PRO = "eisbehr.gcc.pro";

    public GccApp() {
        super(getString(R.string.cache_menu_gcc), R.id.cache_app_gcc, null);
    }

    @Override
    public boolean isInstalled() {
        return ProcessUtils.isLaunchable(PACKAGE) || ProcessUtils.isLaunchable(PACKAGE_PRO);
    }

    @Override
    protected Intent getLaunchIntent() {
        if (ProcessUtils.isLaunchable(PACKAGE_PRO)) {
            return ProcessUtils.getLaunchIntent(PACKAGE_PRO);
        }
        return ProcessUtils.getLaunchIntent(PACKAGE);
    }
}