Skip to content

Commit eb72c58

Browse files
committed
📚 Update the README.md file
1 parent bb420b9 commit eb72c58

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,19 @@ import Instabug from 'instabug-reactnative';
3636
Instabug.startWithToken('IOS_APP_TOKEN', Instabug.invocationEvent.shake);
3737
```
3838
3. Open `android/app/src/main/java/[...]/MainApplication.java`
39-
You should find the getPackages method looks like the following snippet. You just need to add your Android app token (You can skip this step if you are building an iOS app only).
39+
You should find the getPackages method looks like the following snippet. You just need to add your Android app token (You can skip this step if you are building an iOS app only). You can change the invocation event from here, simply by replacing the `"shake"` with any of the following `"button"`, `"none"`, `"screenshot"`, or `"swipe"`. You can change the primary color by replacing the `"#1D82DC"` with any colour of your choice.
40+
In the case that you are using the floating button as an invocation event, you can change the floating button edge and the floating button offset using the last two methods, by replacing `"left"` to `"right"`, and by changing the offset number.
4041
```javascript
4142
@Override
4243
protected List<ReactPackage> getPackages() {
4344
return Arrays.<ReactPackage>asList(
4445
new MainReactPackage(),
45-
new RNInstabugReactnativePackage("ANDROID_APP_TOKEN",MainApplication.this,"shake","#1D82DC"));
46+
new RNInstabugReactnativePackage.Builder("YOUR_APP_TOKEN", MainApplication.this)
47+
.setInvocationEvent("shake")
48+
.setPrimaryColor("#1D82DC")
49+
.setFloatingEdge("left")
50+
.setFloatingButtonOffsetFromTop(250)
51+
.build()
4652
}
4753
```
4854
You can find your app token by selecting the SDK tab from your [**Instabug dashboard**](https://dashboard.instabug.com/app/sdk/).

0 commit comments

Comments
 (0)