我目前是新手在Windows Phone 8.1 c#商店应用程序开发中。我的应用程序需要内购,我在互联网上参考了很多链接,但我只找到了Windows Phone 8和Windows Phone 8.1 Silverlight应用程序的文档,没有针对Windows Phone 8.1商店应用程序的具体文档。根据Windows Phone 8文件,我将应用程序提交为测试版应用程序,并创建了一个可消耗产品,以进行测试。在CurrentAppsimulator类中,我已经创建了一个testwindoesphone.xml文件,并且正在正常工作,但我不知道如何使用CurrentApp类构建代码。我参考了MSDN,但每次我使用CurrentApp类时都会出现805a0194错误,请指导我如何在我的Windows Phone 8.1应用程序中启用内购。
async private void btnCurrentApp_Click(object sender, RoutedEventArgs e)
{
LicenceInfo = CurrentApp.LicenseInformation;
//await CurrentApp.RequestProductPurchaseAsync("PremimumVersion",false);
if (LicenceInfo.ProductLicenses["PremimumVersion"].IsActive)
{
Debug.WriteLine("Already Purchased");
}
else
{
// await CurrentApp.RequestAppPurchaseAsync(false);
//await CurrentApp.RequestProductPurchaseAsync("PremimumVersion");
await CurrentApp.RequestProductPurchaseAsync("PremimumVersion");
var productLicenses = CurrentApp.LicenseInformation.ProductLicenses;
MaybeGiveMeGold(productLicenses["Premimum App"], 0);
//PurchaseResults purchaseResults = await CurrentApp.RequestProductPurchaseAsync();
//Debug.WriteLine("Purchase Status :: " + purchaseResults.Status);
}
}
请告诉我在appxmanifest文件中放置appid或guid的位置。
注意:我已经为Beta应用程序完成了商店关联。
请帮忙解决这个问题,抱歉我的英语不好。