Android Integration
The Android SDK is a wrapper over our Web application.
The SDK wraps the webapp and take care of concerns like
- Back navigation
- UPI Intent handling for payments
Usage
- Add Jitpack repository to your project’s Gradle file
- Add the dependency to your Gradle file.
- Initiate our SDK using the below code snippet.
- Now, to open the store, you can simply call
This will open a new activity and render Hubble’s SDK.
With fragments
- If you have a fragments based view, you can get Hubble fragment with the below code snipped.
- When your activity receives a system back event when Hubble fragment is in view, you can instruct the fragment to navigate back using,
goBack
method returns true is Hubble sdk performed navigation. If user is on the root view of Hubble, i.e. the
homepage, then goBack
will return false.
Events
If you are interested in anaytics events, you can pass a callback to Hubble on initialization.
Whenever there is an event triggered within the SDK, Hubble will call this callback with the event name and properties.
Deeplinks
You may have a usecase where you want to open a brand page or some other page directly on sdk initialization.
You can do it through page
parameter when calling init
.
Currently we support opening three pages
- Brand page
brand
which also needs abrandId
parameter - Transaction history page
transactions
- Help & Support page
support
Examples
Changelog
Version | Date | Changes | By |
---|---|---|---|
0.0.1 | 13 May 2024 | First version | Yash Joshi |
0.0.2 | 17 May 2024 | Support fragments and relay events back to native from webview | Priyanshu |
0.0.3 | 22 May 2024 | Interface refactor and support for reloading the webview | Sudhagar |
0.0.4 | 26 Sep 2024 | Support for opening different pages | Priyanshu |