File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 11# capacitor-segment
22- Capacitor wrapper plugin for Segment analytics mobile SDK.
3- - Currently only implemented on iOS.
3+ - Only implemented on iOS and Android (not for PWA)
44
55## Installation
66
@@ -15,6 +15,27 @@ $ yarn cap sync
1515$ npm install @jairemix/capacitor-segment
1616$ npx cap sync
1717```
18+ ### Android only
19+ After installing and syncing the Capacitor plugin, remember to add it to ` MainActivity.java `
20+ ``` java
21+ // Other Imports
22+ import com.jairemix.capacitor.segment.SegmentPlugin ;
23+
24+ public class MainActivity extends BridgeActivity {
25+
26+ @Override
27+ public void onCreate (Bundle savedInstanceState ) {
28+ super . onCreate(savedInstanceState);
29+
30+ // Initializes the Bridge
31+ this . init(savedInstanceState, new ArrayList<Class<? extends Plugin > > () {{
32+ add(SegmentPlugin . class);
33+ // Additional plugins you've installed go here
34+ }});
35+ }
36+
37+ }
38+ ```
1839
1940## Example
2041``` ts
You can’t perform that action at this time.
0 commit comments