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

Commit b90185f

Browse files
committed
added possibility to use NULL license key for test ids
1 parent fc5d305 commit b90185f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

android/src/main/java/com/idehub/Billing/InAppBillingBridgePackage.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public class InAppBillingBridgePackage implements ReactPackage {
1616

1717
public InAppBillingBridgePackage(String licenseKey, Activity activity) {
1818
_licenseKey = licenseKey;
19+
_licenseKeySetInConstructor = true;
1920
_activity = activity;
2021
}
2122

@@ -24,16 +25,17 @@ public InAppBillingBridgePackage(Activity activity) {
2425
}
2526

2627
private String _licenseKey;
28+
private Boolean _licenseKeySetInConstructor = false;
2729
private Activity _activity;
2830

2931
@Override
3032
public List<NativeModule> createNativeModules(
3133
ReactApplicationContext reactContext) {
3234
List<NativeModule> modules = new ArrayList<>();
33-
if (_licenseKey == null)
35+
if (!_licenseKeySetInConstructor)
3436
modules.add(new InAppBillingBridge(reactContext, _activity));
3537
else
36-
modules.add(new InAppBillingBridge(reactContext, _licenseKey, _activity));
38+
modules.add(new InAppBillingBridge(reactContext, _licenseKey, _activity));
3739

3840
return modules;
3941
}

0 commit comments

Comments
 (0)