question

VishvanathanK-9568 avatar image
0 Votes"
VishvanathanK-9568 asked VishvanathanK-9568 answered

Update Checker in UWP

Hi,
I had installed the journal app(the new one ) from Microsoft Store. So presumably it is an UWP.
And how do I have an update checker in my UWP app.
Like this,
80639-image.png



So that I would alert my app users to update to the latest version,
Thanks,
Vishvanathan K

windows-uwp
image.png (1.3 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NicoZhu-MSFT avatar image
0 Votes"
NicoZhu-MSFT answered NicoZhu-MSFT edited

Hello,

Welcome to Microsoft Q&A.

If you have submitted the app to the Microsoft Store, then you can check the updates through `StoreContext`.

This document may help you:

Download and install package updates from the Store

 private StoreContext context = null;
    
 private async void Button1_Click(object sender, RoutedEventArgs e)
 {
       
     if (context == null)
     {
         context = StoreContext.GetDefault();
     }
    
     // Get the updates that are available.
     IReadOnlyList<StorePackageUpdate> updates =
         await context.GetAppAndOptionalStorePackageUpdatesAsync();
    
     if (updates.Count > 0)
     {
          
     // has available update 
     }
 }

Currently GetAppAndOptionalStorePackageUpdatesAsync can't use to check the new version number in store, you just use it to notify user, it has update now, and then use StoreContext.GetAppAndOptionalStorePackageUpdatesAsync to get update.


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

VishvanathanK-9568 avatar image
0 Votes"
VishvanathanK-9568 answered

Thanks for the link and answer @NicoZhu-MSFT

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.