Install apk update from my app

Hi,

I have an update stored on a server. I would like to launch this update directly from my app to do the update. What's the best way to do that king of thing ?
Do u have an idea ?

Tagged:

Posts

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    You have to download your apk in your device, then do something like this (it's in java but you can convert in cshap very easly)

                            final Uri uri = Uri.parse("file://" + message); // creo l'uri con il file
                            Intent install = new Intent(Intent.ACTION_VIEW);
                            install.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                            install.setDataAndType(uri, "application/vnd.android.package-archive");
                            startActivity(install);
    
Sign In or Register to comment.