Skip to content

Commit a1225a0

Browse files
author
Alexander
authored
Update README.md
1 parent 70179bb commit a1225a0

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,32 @@ Android Billing v4+ implementation for non consumable products. Written in **Kot
77
*My implemenation is much easy to use, you can adapt it also for subscriptions and for consumable products.*
88
*PurchaseManager.kt is well documented.*
99

10+
[![](https://jitpack.io/v/Almaren/Android_Billing_v4up_PurchaseManager.svg)](https://jitpack.io/#Almaren/Android_Billing_v4up_PurchaseManager)
11+
1012
## Preparing:
1113
* **First put your developer Base64-encoded RSA public key (from Google Play Console: your app -> monetization setup) in: /local.properties/base64EncodedPublicKey=YOUR_KEY**
1214
* **In order to test billing - Release your application with an integrated billing library but not yet implemented to any testing track (internal testing is better). Just adding 'com.android.billingclient:billing:4+' is enough at this stage.**
1315
* **For debugging testing: in Google Developers Console (Not Play Console) add your debug key SHA1.**
1416
* **In Google Play Console create a testers group.**
17+
* Add to your project build.gradle:
18+
```
19+
allprojects {
20+
repositories {
21+
...
22+
maven { url 'https://jitpack.io' }
23+
}
24+
}
25+
```
26+
to the app build.gradle:
27+
```
28+
dependencies {
29+
implementation 'com.github.Almaren:Android_Billing_v4up_PurchaseManager:1.0.0'
30+
}
31+
```
1532

1633
## How to use:
1734
**All methods of PurchaseManager must be called from the main ui thread.**
1835
1. Call init(activity: Activity, listener: PurchaseListener) from Activity.onCreate(..). Via PurchaseListener you will receive available products to purchase, a purchased items, a result from the recent purchase.
1936
2. Call onResume() from Activity.onResume()
2037
3. Call dispose() from Activity.onDestroy()
2138
4. IAP methods: getItemPrices() and purchaseItem(itemType: PurchaseType)
22-

0 commit comments

Comments
 (0)