Skip to content

Commit de26be3

Browse files
author
Ali Abdelfattah
authored
Merge pull request #453 from Instabug/docs/update-readme
Update README.md
2 parents b2c2b47 + 8c59414 commit de26be3

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

README.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -106,40 +106,41 @@ Alternatively, for iOS you can use [CocoaPods](https://cocoapods.org/) for manag
106106
* Make sure to import the package class:
107107
`import com.instabug.reactlibrary.RNInstabugReactnativePackage;`
108108
* **For React Native >= 0.60**
109-
Add the above integration code to the `onCreate()` method instead:
110-
109+
Add the integration code to the `onCreate()` method like the below snippet.
110+
111111
```java
112-
@Override
113-
public void onCreate() {
114-
new RNInstabugReactnativePackage
115-
.Builder("APP_TOKEN", MainApplication.this)
116-
.setInvocationEvent("shake")
117-
.setPrimaryColor("#1D82DC")
118-
.setFloatingEdge("left")
119-
.setFloatingButtonOffsetFromTop(250)
120-
.build();
112+
@Override
113+
public void onCreate() {
121114
super.onCreate();
122-
SoLoader.init(this, /* native exopackage */ false);
123-
}
115+
new RNInstabugReactnativePackage
116+
.Builder("APP_TOKEN", MainApplication.this)
117+
.setInvocationEvent("shake")
118+
.setPrimaryColor("#1D82DC")
119+
.setFloatingEdge("left")
120+
.setFloatingButtonOffsetFromTop(250)
121+
.build();
122+
}
124123
```
125124
* **For React Native < 0.60**
126-
You should find the `getPackages()` method looks like the following snippet. You just need to add your Android app token. 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.
127-
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.
125+
You should find the `getPackages()` method looks like the below snippet. You just need to add your Android app token.
128126
129127
```javascript
130128
@Override
131129
protected List<ReactPackage> getPackages() {
132-
return Arrays.<ReactPackage>asList(
133-
new MainReactPackage(),
134-
new RNInstabugReactnativePackage.Builder("YOUR_APP_TOKEN", MainApplication.this)
135-
.setInvocationEvent("shake")
136-
.setPrimaryColor("#1D82DC")
137-
.setFloatingEdge("left")
138-
.setFloatingButtonOffsetFromTop(250)
139-
.build()
130+
return Arrays.<ReactPackage>asList(
131+
new MainReactPackage(),
132+
new RNInstabugReactnativePackage.Builder("YOUR_APP_TOKEN", MainApplication.this)
133+
.setInvocationEvent("shake")
134+
.setPrimaryColor("#1D82DC")
135+
.setFloatingEdge("left")
136+
.setFloatingButtonOffsetFromTop(250)
137+
.build()
138+
);
140139
}
141140
```
142-
141+
* 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 color of your choice.
142+
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.
143+
143144
You can find your app token by selecting the SDK tab from your [**Instabug dashboard**](https://dashboard.instabug.com/app/sdk/).
144145
145146
4. Make sure the following snippet is added to your project level `build.gradle`. This should be added automatically upon linking. If not, you can add it manually.

0 commit comments

Comments
 (0)