Apk installieren ohne Download

Kann ich installieren apk Datei ohne Download? Die apk Datei ist auf dem server. Ich habe versucht den code unter, aber es funktioniert nicht:

public static void InstallProgram(Uri uri, Context context){
    Intent intent = new Intent(Intent.ACTION_VIEW);           
    intent.setDataAndType(uri,"application/vnd.android.package-archive");
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);     
    context.startActivity(intent);
}

Wo uri ist http://192.168.43.1:6789/mobile_base/test.apk.
Gibt es einen Fehler:

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=http://192.168.43.1:6789/mobile_base/test.apk typ=application/vnd.android.package-archive flg=0x10000000 }

Wenn Sie einige Gedanken, die Sie teilen können mit mir. Danke.

  • finden Sie unter diesem stackoverflow.com/questions/5952516/install-apk-from-url
  • Ich möchte auch die Installation von android-Anwendung ohne Download von meinem eigenen server. Hast du die Lösung finden?
  • Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(neue Datei(downloadPath + fileName), "application/vnd.android.Paket-Archiv");
InformationsquelleAutor Nolesh | 2012-06-08
Schreibe einen Kommentar