Download and install an application (apk) from internal memory - no SD card

后端 未结 6 1931
庸人自扰
庸人自扰 2021-01-06 19:35

Greetings and a happy new year to all my fellow programmers.

My code downloads an apk file from a remote server. I need to initiate the installation procedure throug

6条回答
  •  天命终不由人
    2021-01-06 20:18

    Also you can use

    downloadedFile.setReadable(true, false);

    with

    fileOutputStream = openFileOutput(fileName, Context.MODE_PRIVATE);

    There are two setReadable method. The first has one parameter and the second one has two parameters.

    setReadable(boolean readable)
    setReadable(boolean readable, boolean ownerOnly)
    

提交回复
热议问题