diff --git a/nuget/readme.txt b/nuget/readme.txt index 84dc8d9..6bfca0b 100644 --- a/nuget/readme.txt +++ b/nuget/readme.txt @@ -23,6 +23,16 @@ protected override void OnActivityResult(int requestCode, Result resultCode, Int InAppBillingImplementation.HandleActivityResult(requestCode, resultCode, data); } +## Android Current Activity Setup + +This plugin uses the [Current Activity Plugin](https://github.com/jamesmontemagno/CurrentActivityPlugin/blob/master/README.md) to get access to the current Android Activity. Be sure to complete the full setup if a MainApplication.cs file was not automatically added to your application. Please fully read through the [Current Activity Plugin Documentation](https://github.com/jamesmontemagno/CurrentActivityPlugin/blob/master/README.md). At an absolute minimum you must set the following in your Activity's OnCreate method: + +```csharp +Plugin.CurrentActivity.CrossCurrentActivity.Current.Activity = this; +``` + +It is highly recommended that you use a custom Application that are outlined in the Current Activity Plugin Documentation](https://github.com/jamesmontemagno/CurrentActivityPlugin/blob/master/README.md) + ### Android Security I recommend reading the Google Play services Security and Design that will walk you through your options on storing your public key. InAppBilling Pluging offers Android developers an additional interface, IInAppBillingVerifyPurchase to implement to verify the purchase with their public key and helper methods to encrypt and decrypt. It is recommended to atleast follow the XOR guidance if you do not want to setup a verification server. @@ -57,4 +67,4 @@ Implement the interface with this funcationality: } } -Plugin.InAppBilling.InAppBillingImplementation.InAppBillingSecurity.VerifyPurchase takes in your public key which you now have reversed back to standard and will do proper RSA validation on the signed data. \ No newline at end of file +Plugin.InAppBilling.InAppBillingImplementation.InAppBillingSecurity.VerifyPurchase takes in your public key which you now have reversed back to standard and will do proper RSA validation on the signed data.