private void checkRestore() {
        if (DataStore.isNewlyCreatedDatebase() && !restoreMessageShown && BackupUtils.hasBackup(BackupUtils.newestBackupFolder(false))) {
            restoreMessageShown = true;
            Dialogs.newBuilder(this)
                    .setTitle(res.getString(R.string.init_backup_restore))
                    .setMessage(res.getString(R.string.init_restore_confirm))
                    .setCancelable(false)
                    .setPositiveButton(getString(android.R.string.ok), (dialog, id) -> {
                        dialog.dismiss();
                        DataStore.resetNewlyCreatedDatabase();
                        backupUtils.restore(BackupUtils.newestBackupFolder(false));
                    })
                    .setNegativeButton(getString(android.R.string.cancel), (dialog, id) -> {
                        dialog.cancel();
                        DataStore.resetNewlyCreatedDatabase();
                    })
                    .create()
                    .show();
        }
    }
detect whether c:geo is unable to log in
main/src/main/java/cgeo/geocaching/activity/AbstractNavigationBarActivity.java