How do you detect that the install was successful and delete the apk so it doesnt waste space.It works fine on 2.3.x devices and on 3.2 devices on which Ive tested it.However, on 4.x devices, I get java.io.FileNotFoundException: on the line: InputStream is c.getInputStream();.I have permissions INTERNET and WRITEEXTERNALSTORAGE.
And Android Studio Install Was SuccessfulA lot of things have changed in that time, so I had to do this with a different approach. So for me, alternative solution is Download directory in external storage. Packages can only be installed if your app is signed with the same signature as the ROM - stackoverflow.coma15660063832776. I used this answer and then the following to trigger the install stackoverflow.coma401311962276198. And Android Studio Archive Resolved ItHard coding the mime type to applicationvnd.android.package-archive resolved it for me. But when I pull from emulator that.apk and install it manually everything works fine. I now download it to Environment.getExternalStoragePublicDirectory(Environment.DIRECTORYDOWNLOADS) and that works for me. Trust me, no one who intentionally downloads an apk on the web will want to keep the apk in the downloads folder. Really helped me. But i faced with java.io.FileNotFoundException. A good starting point would be removing all the code that is commented out. Should I be naming the myapkv1.0xx.apk and and in that version proactivily set the remote path to look for v.2.0 whenever it is released. You need to name your APK file file some sort of versioning, remembering to always set your NEXT release version in your currently released app. If the server returns Success, then start the update procedure (downloading, saving and installing the new update), else simply dont do anything. The reputation requirement helps protect this question from spam and non-answer activity.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |