Game Development Reference
In-Depth Information
sendToStore = function () {
var uri = new Windows.Foundation.Uri(currentApp.linkUri.rawUri);
Windows.System.Launcher.launchUriAsync(uri);
}
What is great about this code is that the link to the store will automatically resolve itself
when the app is published. This is just part of the application's data that is built in during the
publishing process.
NOTE
It's important to note that this link will not work when you are locally testing. As of now,
there is no way to test this during development since it relies on the app actually being
published in the store.
As you can see, with only a few lines of code you can simply lock out parts of your game un-
til it's purchased. Likewise, it's just as easy to set up trial mode in the developer dashboard.
Simply go to the “Selling details” section of your game and, next to where you set your
game's price, you will see a drop down to enable trial mode ( Figure 7-4 ).
Figure 7-4. The option to set up a trial mode is right next to where you set the price in the deve-
loper dashboard.
As you can see in Figure 7-5 , you have several time-based options if you want your app to
lock the user out after a specific period of time, including an option for the trial to never ex-
pire.
Search WWH ::




Custom Search