简体   繁体   中英

Windows phone redirect to app store to update app

Really simple question, but I was not able to find answers relating to this.

I have a Phonegap application which is updated regularly and they must update the app before logging into the app. Currently I prompt the user with a upgrade button.

My question is how do I redirect them from my app. to the Windows store pointing to my app to let me them update and once that is done reopen my app?

I found out the routines to call to achieve this, this redirects them to the app store but I am not sure if the app store is the same as update page or that app. how do I send them directly to update the app.

*Note: I am unable to test this yet, since my app has not be approved yet to be published on the app but, but I would like to know the answer so once it is approved the changes will work. Thanks

call upon MarketplaceDetailTask class from using Microsoft.Phone.Tasks ;

MarketplaceDetailTask marketplaceDetailTask = new MarketplaceDetailTask();
marketplaceDetailTask.ContentIdentifier = "{your unique app guid goes here}";
marketplaceDetailTask.ContentType = MarketplaceContentType.Applications;
marketplaceDetailTask.Show();

In your case, you need to check user installed version and version in the Store - if user is running lower version you can use your above code to redirect to Store app page for triggering update. If user and store has same version, you can load the app.

In order to do latest version checks, you might need to have the latest version number somewhere in the net - have checked it in the app.

you can use below code to do version checks: http://bjorn.kuiper.nu/2011/10/01/wp7-notify-user-of-new-application-version/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM