public static void checkPendingDownloads(final Activity activity) {
        final DownloadManager downloadManager = (DownloadManager) activity.getSystemService(DOWNLOAD_SERVICE);
        if (null != downloadManager) {
            final DownloadManager.Query query = new DownloadManager.Query();
            try (Cursor c = downloadManager.query(query)) {
                if (c == null) {
                    Log.w("checkPendingDownloads: querying DownloadManager returned null");
                    return;
                }
                final int columnId = c.getColumnIndex(DownloadManager.COLUMN_ID);
                final int columnStatus = c.getColumnIndex(DownloadManager.COLUMN_STATUS);
                final int columnBytesA = c.getColumnIndex(DownloadManager.COLUMN_BYTES_DOWNLOADED_SO_FAR);
                final int columnBytesT = c.getColumnIndex(DownloadManager.COLUMN_TOTAL_SIZE_BYTES);
                while (c.moveToNext()) {
                    final int status = c.getInt(columnStatus);
                    if (status == DownloadManager.STATUS_SUCCESSFUL) {
                        final int bytesA = c.getInt(columnBytesA);
                        final int bytesT = c.getInt(columnBytesT);
                        if (bytesA == bytesT) {
                            final long id = c.getLong(columnId);
                            final PendingDownload p = PendingDownload.load(id);
                            if (p != null) {
                                startReceive(activity, downloadManager, id, p);
                                Log.d("download #" + id + " retriggered manually");
                            }
                        }
                    }
                }
            }
        }
    }
check for successfully completed, but not yet received downloads
and offer to download them
main/src/main/java/cgeo/geocaching/downloader/DownloaderUtils.java