Regarding app update from Microsoft store app( version 1.5.1.0 ) to SideLoaded build 1.6.2.0
Hi team,
When the app UWP application's version is changed then the Update method has to call in App.XAML.cs file. It's implemented in the OnStartAsync method. Update method like below:
private Task update()
{
Package package = Package.Current;
PackageId packageId = package.Id;
PackageVersion version = packageId.Version;
var currentVersionTotal = (version.Major * 100) + (version.Minor * 10) + (version.Build * 1);
currentversion = currentVersionTotal;
if (currentVersionTotal > sharedDataFromLocalDb.FirstOrDefault().VersionTotal)
{
_sharedManager.UpdateFlagOfDeviceID(1);
_database.Commit();
WebserviceManager.Instance.ConfigureWebServiceManager(sharedDataFromLocalDb.FirstOrDefault().Base_Url, GetDeviceId());
NavigationService.Navigate(typeof(Views.DataSync));
return Task.FromResult<object>(null);
}
The store application installs and login into the app and closes it. Then update the side-loaded build app update is working fine. But when the old version of the app is in the background then and updates the application the above code is not executed.
I want to execute the above code when the app is running in the background or in a close state.
Please help me on this
Thanks,Regards
Kiran Kumar Maharana