Plugin.XF.AppInstallHelper
Plugin.XF.AppInstallHelper copied to clipboard
Windows UWP integration (Code snippet attached)
Hi Jimmy, UWP support of specifying path to download and installing the app package can be done by the following platform specific code. I tried to integrate this into your source code to support Windows platform, but haven't figured it out. Is it possible for you to integrate this code into this wonderful AppInstallHelper?
//---------UWP code (Tested) using Applicat.Common; using Applicat.UWP; using System; using System.IO; using System.Threading.Tasks;
[assembly: Xamarin.Forms.Dependency(typeof(Update))] namespace Applicat.UWP { public class Update : IUpdate { public string SpecifyFilePath(string fileName) { return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), fileName); }
public async Task<bool> Install(string stringUri)
{
try
{
return await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-appinstaller:?source=" + stringUri));
}
catch (Exception ex)
{
return false;
}
}
}
}
Hi,
I have no planning to implement to UWP... But I am happy if you could create a pull request to improve the code
OK, Jimmy, thanks.