Question by
Meer_Hamza · Nov 18, 2015 at 06:13 AM ·
windows phone 8in app purchasenot showingproduct
in-App purchasing for windows phone 8 products are not showing
Hi all, i have build a game in unity and built it for windows phone 8 platform. Right now i am implementing in-App purchasing in native windows which is almost done, the problem that i have encountered that my register products do not show in a game except one. This is really confusing for me that only one product out of 4 shown and others not. here is my code that i have written in Visual studio to get all products from windows store. A little help will be very helpful. Thanks
private async void RenderStoreItems()
{
picItems.Clear();
try
{
//StoreManager mySM = new StoreManager();
ListingInformation li = await Windows.ApplicationModel.Store.CurrentApp.LoadListingInformationAsync();
foreach (string key in li.ProductListings.Keys)
{
ProductListing pListing = li.ProductListings[key];
//System.Diagnostics.Debug.WriteLine(key);
string status = Windows.ApplicationModel.Store.CurrentApp.LicenseInformation.ProductLicenses[key].IsActive ? "Purchased" : pListing.FormattedPrice;
string imageLink = string.Empty;
MessageBox.Show("product ka naam hay: "+pListing.Name);
//if (pListing.Name == "Get 25 Hints")
//{
picItems.Add(
new ProductItem
{
imgLink = key.Equals("AdBlocker") ? "block-ads.png" : "block-ads.png",
Name = pListing.Name,
Status = status,
key = key,
BuyNowButtonVisible = Windows.ApplicationModel.Store.CurrentApp.LicenseInformation.ProductLicenses[key].IsActive ? System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible
}
);
// }
}
pics.ItemsSource = picItems;
}
catch (Exception e)
{
MessageBox.Show("Unable to load in app purchases" + e);
}
}
Comment
@jashan please look into this really messed up about this right now.. thanks