0

I am trying to install an apk using the following code below, whenever I tried to execute the code, it only shows 'Starting...'. I don't see any notification that the apk is being installed.

Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse(url));
        startActivity(intent);
ILikebanana
  • 109
  • 1
  • 2
  • 10
  • Take a look at this post: http://stackoverflow.com/questions/4967669/android-install-apk-programmatically?rq=1 – Naveed Nov 01 '13 at 22:10

1 Answers1

0

Do not use Uri.parse(). Use Uri.fromFile(). If your answer to that is "it is not a file", then that is your problem -- you need to have the APK as a file, somewhere that the installer can reach it (e.g., external storage).

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491