Windows手机 - C# - 链接购买应用程序

时间:2013-07-15 13:56:33

标签: c# windows-phone-7 windows-phone-8 windows-phone-7.8

如何在试用应用中实施“购买”链接?

您是否使用与实施“费率”链接相同的方法?

非常感谢。

2 个答案:

答案 0 :(得分:2)

使用MarketplaceDetailTask启动器:

MarketplaceDetailTask marketplaceDetailTask = new MarketplaceDetailTask();
marketplaceDetailTask.Show();

请参阅:

How to use the Marketplace detail task for Windows Phone

答案 1 :(得分:0)

首先,您必须在开发者帐户中注册该应用作为应用内商品,然后使用此...

  public static LicenseInformation licenseInformation;

    if (!App.licenseInformation.ProductLicenses["productid"].IsActive)
             {
                    try
                    {
                        // The user doesn't own this feature, so 
                        // show the purchase dialog.
                        await CurrentApp.RequestProductPurchaseAsync("productid", false);
                        // the in-app purchase was successful
                    }
                    catch (Exception)
                    {
                        // The in-app purchase was not completed because 
                        // an error occurred.
                    }
                }
                else
                {

                    // The user already owns this feature.
                }
            }