Detecting if the EPS is installed

To detect if the EPS application is installed, the following snippet can be used:

private boolean isInstalled() {
    try {
        Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setData(Uri.parse("eclipse://payment.service/version"));
        startActivity(intent);
        return true;
    } catch (ActivityNotFoundException e) {
        return false;
    }
}

private void redirectToAppStore() {
    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.ukheshe.eclipse.payment.service"));
    intent.setPackage("com.android.vending");
    startActivity(intent);
}