win8_license_initialize_sandbox

Initialize a sandbox with the trial properties for licencing.

Syntax:

win8_license_initialize_sandbox(xml);


Argument Description
xml The xml that defines the sandbox licence, as a string.


Returns: N/A


Description

This function enables a sandbox environment in which you can test the Trial Play features of your game on Windows 8. The function takes a string containing the XML that will define the sandbox. You can find complete details of all the possible settings from Microsoft here and the example code below gives a basic working string that you can use as a base.


Example:

var license;
license = '<?xml version="1.0" encoding="utf-16" ?>
   <CurrentApp>
   <ListingInformation>
      <App>
         <AppId>988b90e4-5d4d-4dea-99d0-e423e414ffbc</AppId>
         <LinkUri></LinkUri>
         <CurrentMarket>en-us</CurrentMarket>
         <AgeRating>3</AgeRating>
         <MarketData xml:lang="en-us">
            <Name></Name>
            <Description></Description>
            <Price>0.99</Price>
            <CurrencySymbol>$</CurrencySymbol>
            <CurrencyCode>USD</CurrencyCode>
         </MarketData>
      </App>
   </ListingInformation>
   <LicenseInformation>
      <App>
         <IsActive>false</IsActive>
         <IsTrial>true</IsTrial>
      </App>
   </LicenseInformation>
   </CurrentApp>';
win8_license_initialize_sandbox(license);

The above code will create a sandbox to trial play your game, using the given string as the XML template.


Back: Windows 8
Next: win8_livetile_notification_begin
© Copyright YoYo Games Ltd. 2018 All Rights Reserved