本文介绍了检查应用程序内购买是否导致Windows Phone 8崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 我创建了一个应用程序添加的应用程序内购买并上传为测试版的测试版。



这是应用程序内购买的代码。


 Private async void Purchase()
{
LicenseInformation licenseInformation = CurrentApp.LicenseInformation;
string str;
try
{
var listing = await CurrentApp.LoadListingInformationAsync();
var _price = listing.FormattedPrice;
//开始购买产品
await CurrentApp.RequestProductPurchaseAsync(" FeatureName",false);

ProductLicense productLicense = null;
if(CurrentApp.LicenseInformation.ProductLicenses.TryGetValue(" FeatureName",out productLicense))
{
if(productLicense.IsActive)
{
MessageBox.Show ("购买的产品");

CurrentApp.ReportProductFulfillment(" FeatureName");
ProductPurchased(); //显示购买的产品&触发完整版
返回;
}
其他
{
str ="购买失败" ;;
ShowErrorPopup(str); //它显示错误消息。购买失败。
返回;
}
}
}
catch(例外)
{
str ="购买失败。检查互联网连接,然后重试";
ShowErrorPopup(str);
返回;
}
}


安装测试版后,我点击了购买按钮。我转到购买点。 
$


它要求安装或取消。



通过给予安装或取消将杀死该应用程序。



我做错了什么。有人帮忙解决这个问题???? zh-b $ b

解决方案


这篇关于检查应用程序内购买是否导致Windows Phone 8崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-17 09:27
查看更多