I've been struggling to get my application to update from a direct url, i want to download a apk and then prompt to user to install the apk. How can I do this?
Thanks.
EDIT:
Intent intent = new Intent(Intent.ActionView);
intent.SetDataAndType(Android.Net.Uri.FromFile(new Java.IO.File(Android.OS.Environment.ExternalStorageDirectory + "/download/" + "WhatsApp Messenger_v2.17.395_apkpure.com.apk")), "application/vnd.android.package-archive");
intent.AddFlags(ActivityFlags.GrantReadUriPermission);
intent.SetFlags(ActivityFlags.NoHistory);
intent.SetFlags(ActivityFlags.ClearWhenTaskReset);
Forms.Context.StartActivity(Intent.CreateChooser(intent, "Open APK"));
With the code above , opens the app and asks to install with android 4.4, but in my phone android 7.0 doesnt work, gives this alert:"There was a problem parsing the package".