android parse erreur lors de l'analyse du package

Je suis le développement de la mise à jour automatique de l'intérieur du serveur.

Le téléchargement fonctionne bien, mais quand j'essaie d'installer l'apk téléchargé j'obtiens: "erreur d'analyse, de résolution de l'analyse du package".

private BroadcastReceiver mDownloadReceiver = new BroadcastReceiver() {
    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        if (DownloadManager.ACTION_DOWNLOAD_COMPLETE.equals(action)) {
            long downloadId = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, 0);
            Log.i(VERSION_LOG_TAG, "received download id: " + downloadId);

            DownloadManager.Query query = new DownloadManager.Query();
            query.setFilterById(enqueue);
            Cursor cursor = dm.query(query);
            if (cursor.moveToFirst()) {
                int columnIndex = cursor.getColumnIndex(DownloadManager.COLUMN_STATUS);

                if (DownloadManager.STATUS_SUCCESSFUL == cursor.getInt(columnIndex)) {
                    String uriString = cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI));
                    Log.i(VERSION_LOG_TAG, uriString);

                    Intent installIntent = new Intent(Intent.ACTION_VIEW);
                    File apk = new File(Uri.parse(uriString).getPath());
                    installIntent.setDataAndType(Uri.fromFile(apk), "application/vnd.android.package-archive");
                    startActivity(installIntent);
                }else{
                    Log.e(VERSION_LOG_TAG, "download failed");
                }
            }
        }
    }
};

Je pense que c'est parce que l'url: content://downloads/my_downloads/13
Que dois-je faire de mal?

InformationsquelleAutor NickF | 2014-12-04