I am trying to have a callback function in xamarin forms to alert the user that the task is finished. I haven't figured it out yet and am not sure what is wrong. Any help is appreciated with the proper way of doing this.
The code below is in a button click event. The method FinishPurchase never gets called.
Task<bool> task = StockDataController.Instance.WasItemPurchased(CloudInfo.IAPMonthlySubscriptionProductID);
Task continuation = task.ContinueWith(t=>FinishPurchase());
continuation.Wait();
Previously I was calling the code below in the button click event but I want to execute specific code after the method WasItemPurchased is executed,etc.
bool result=await StockDataController.Instance.WasItemPurchased(CloudInfo.IAPMonthlySubscriptionProductID)