Buy & try in windows Phone 8? -


is possible make buy & try options in windows phone 8 in windows store apps.

one of game in windows store full access 1 week day of download. after windows store locks game(if give 1 week in dashboard).

like that, windows phone 8 having of features. .


http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh286402(v=vs.105).aspx#bkmk_runningtheapplication

even tried buy & try using above link.

i changed checklicense() below.

private void checklicense()     {         if debug         string message = "this sample demonstrates implementation of trial mode in application." +                            "press 'ok' simulate trial mode. press 'cancel' run application in normal mode.";         if (messagebox.show(message, "debug trial",              messageboxbutton.okcancel) == messageboxresult.ok)         {             _istrial = true;         }         else         {             _istrial = false;         }         else         _istrial = _licenseinfo.istrial();         //included lines         if(_istrail)             freeversion = true;   //here free version trigger when user presses try         else             freeversion = false;   //here fullversion trigger when user presses buy         //included lines        endif     } 

if did this. run in master mode. goes freeversion false.(i.e: _istrail returns false).

its because of have not yet uploaded windows phone store or other problem??

help out solve this??

here code used:

private void checklicense() {    licenseinformation licenseinformation = currentapp.licenseinformation;             try             {                 var listing = await currentapp.loadlistinginformationasync();                 var _price = listing.formattedprice;                 // start product purchase                 await currentapp.requestproductpurchaseasync("featurename", false);                  productlicense productlicense = null;                 if (currentapp.licenseinformation.productlicenses.trygetvalue("featurename", out productlicense))                 {                     if (productlicense.isactive)                     {                         messagebox.show("product purchased");                          currentapp.reportproductfulfillment("featurename");                          productpurchased();       // display product purchased & trigger full version                          return;                     }                     else                     {                         str = "purchase failed";                        showerrorpopup(str); // shows error msg. purchase failed.                        return;                     }                 }            }            catch (exception)             {                 str = "purchase failed. check internet connection , try again";                 showerrorpopup(str);                 return;             } } 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -