Android Integration Guide
This guide will walk you through the setup process for the Mirror World Smart SDK on Android.
1. Create a Developer Account
Create a developer account on the Developer dashboard. Create project and create an API Key. If you already have an API Key, you may skip this step and proceed to the next one.
Import the Mirror World SDK
Notice: > The minimum version that SDK requires is Android 4.4.
- Download and uncompress Mirror World Android SDK.
- Put the
mirrorsdk.aar
under thelibs
folder. You may create alibs
folder if it doesn't exist under yourProject root > app
directory.
- Install SDK dependency. In your
build.gradle
file, please add the Mirror World SDK as a dependency.
2. Configuring CustomTab
If you want to use CustomTab to show content to users (Recommended), you need to
configure the following on your AndroidManifest.xml
.
Add permission for internet
If you want to use CustomTab to show content to users (Recommended), you need to
configure the following on your AndroidManifest.xml
.
Update dependencies
Then add this to your gradle file:
Register this activity
If you want to use CustomTab to show content to users (Recommended), you need to
configure the following on your AndroidManifest.xml
.
Complete Android Manifest
The final file will look something like this:
3. Usage
Choose your chain
Developers must use specified classes to call APIs on specified chains.
For example, if they want to call init API on the BNB chain, they must call MWEVM.initSDK().
And this is their correspondence:
- Solana
- Ethereum
- Polygon
- BNB Chain
In the following documents, we will use Solana chain to show how to use Mirror SDK.
Initialization
We can initialize Mirror World SDK with the following code:
Guide user to login
Users need to log in to use some MirrorSDK features (or APIs). If you want them to login for the first time or once again, use the following code:
Going Further
Great! At this point you're pretty much ready to start doing building with the Android SDK for Mirror World. There are a few things you can do to proceed from here:
- Explore the Full Android API Reference to learn more.
- Looking for inspiration? Take a look at our Guides or see what builders are building in the Showcase.
- Join the Mirror World Developer community! We're a vibrant community of builders!
Getting Support
If you're stuck or just looking for support, you may also schedule a support call with our team.
Android Integration Guide
This guide will walk you through the setup process for the Mirror World Smart SDK on Android.
1. Create a Developer Account
Create a developer account on the Developer dashboard. Create project and create an API Key. If you already have an API Key, you may skip this step and proceed to the next one.
Import the Mirror World SDK
Notice: > The minimum version that SDK requires is Android 4.4.
- Download and uncompress Mirror World Android SDK.
- Put the
mirrorsdk.aar
under thelibs
folder. You may create alibs
folder if it doesn't exist under yourProject root > app
directory.
- Install SDK dependency. In your
build.gradle
file, please add the Mirror World SDK as a dependency.
2. Configuring CustomTab
If you want to use CustomTab to show content to users (Recommended), you need to
configure the following on your AndroidManifest.xml
.
Add permission for internet
If you want to use CustomTab to show content to users (Recommended), you need to
configure the following on your AndroidManifest.xml
.
Update dependencies
Then add this to your gradle file:
Register this activity
If you want to use CustomTab to show content to users (Recommended), you need to
configure the following on your AndroidManifest.xml
.
3. Usage
Choose your chain
Developers must use specified classes to call APIs on specified chains.
For example, if they want to call init API on the BNB chain, they must call MWEVM.initSDK().
And this is their correspondence:
- Solana
- Ethereum
- Polygon
- BNB Chain
In the following documents, we will use Solana chain to show how to use Mirror SDK.
Initialization
We can initialize Mirror World SDK with the following code:
Guide user to login
Users need to log in to use some MirrorSDK features (or APIs). If you want them to login for the first time or once again, use the following code:
Going Further
Great! At this point you're pretty much ready to start doing building with the Android SDK for Mirror World. There are a few things you can do to proceed from here:
- Explore the Full Android API Reference to learn more.
- Looking for inspiration? Take a look at our Guides or see what builders are building in the Showcase.
- Join the Mirror World Developer community! We're a vibrant community of builders!
Getting Support
If you're stuck or just looking for support, you may also schedule a support call with our team.