Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmontemagno authored Sep 19, 2020
1 parent e36f46c commit d6f7bd4
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,19 @@ I co-host a weekly development podcast, [Merge Conflict](http://mergeconflict.fm

## Version 4 Major Update - Android

We now use Xamarin.Essentials for getting access to the current activity. So ensure you initialize Xamarin.Essentials in your Android app.

Also if you get a null exception the linker is being aggressive so write the following code in your MainActivity:

```csharp
var context = Platform.AppContext;
var activity = Platform.CurrentActivity;
```

Version 4.X updates to the new Android billing client. This means there are few important changes:
1.) You must acknowledge all purchases within 3 days, by calling `AcknowledgePurchaseAsync` or the Consume API if it a consumable.
2.) You must hanle Pending Transactions from outside of you app. See [docs from Google](https://developer.android.com/google/play/billing/integrate#pending)
3.) `HandleActivityResult` is removed from the API as it is not needed
1. You must acknowledge all purchases within 3 days, by calling `AcknowledgePurchaseAsync` or the Consume API if it a consumable.
2. You must hanle Pending Transactions from outside of you app. See [docs from Google](https://developer.android.com/google/play/billing/integrate#pending)
3. `HandleActivityResult` is removed from the API as it is not needed

### Pending Transactions:
* If the result of PurchaseAsync is PurchaseState.PaymentPending, store the order details locally and inform the user that they will have access to the product when the payment completes
Expand Down

0 comments on commit d6f7bd4

Please sign in to comment.