Skip to content
This repository was archived by the owner on Oct 20, 2020. It is now read-only.

Commit d4592c9

Browse files
committed
Update README.md
1 parent 7c0102e commit d4592c9

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,12 @@ With this, [rnpm](https://github.com/rnpm/rnpm) will do most of the heavy liftin
8080

8181
...
8282
}
83-
83+
// Step 3: For RN < v0.18, override onActivityResult
8484
@Override
8585
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
8686
mReactInstanceManager.onActivityResult(requestCode, resultCode, data);
8787
}
8888
...
89-
// Step 3:
9089
```
9190
5. Add your Google Play license key as a line to your `android/app/src/main/res/values/strings.xml` with the name `RNB_GOOGLE_PLAY_LICENSE_KEY`. For example:
9291
```xml
@@ -97,6 +96,20 @@ Alternatively, you can add your license key as a parameter when registering the
9796
.addPackage(new InAppBillingBridgePackage("YOUR_LICENSE_KEY", this))
9897
```
9998

99+
## Testing with static responses
100+
If you want to test with static responses, you can use reserved productids defined by Google. These are:
101+
* android.test.purchased
102+
* android.test.canceled
103+
* android.test.refunded
104+
* android.test.item_unavailable
105+
106+
If you want to test with these productids, you will have to use a `null` license key. This is because your actual license key will not validate when using these productids.
107+
108+
In order to do this send in `null` as parameter, along with your Activity-instance, when registering the package:
109+
`.addPackage(new InAppBillingBridgePackage(null, this))`
110+
111+
[See the Google Play docs for more info on static responses](http://developer.android.com/google/play/billing/billing_testing.html#billing-testing-static).
112+
100113
## Javascript API
101114
All methods returns a `Promise`.
102115

0 commit comments

Comments
 (0)