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. .
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
Post a Comment