@SuppressWarnings("unused")
    @SuppressLint("PackageManagerGetSignatures")
    private static String getApplicationHashkey(final Context context) {
        final char[] hexChars = "0123456789ABCDEF".toCharArray();
        final StringBuilder sb = new StringBuilder();
        try {
            final PackageInfo info;
            info = context.getPackageManager().getPackageInfo(BuildConfig.APPLICATION_ID, PackageManager.GET_SIGNATURES);
            for (Signature signature : info.signatures) {
                final MessageDigest md = MessageDigest.getInstance("SHA");
                md.update(signature.toByteArray());
                for (byte c : md.digest()) {
                    sb.append(hexChars[Byte.toUnsignedInt(c) / 16]).append(hexChars[c & 15]).append(' ');
                }
            }
        } catch (Exception e) {
            return e.toString();
        }
        return sb.toString();
    }
Enforce a specific language if the user decided so.
main/src/main/java/cgeo/geocaching/CgeoApplication.java