Installation
Update the dependencies in yourbuild.gradle
to include the portal-android
dependency
Initializing Portal
After you update yourbuild.gradle
file, you must sync gradle and you’re ready to import Portal into an Activity of your choice.
With the Portal Android
dependency now installed, we can now create an instance of the Portal
class. Below is an example of how you can do this. In this example, we’re using your app’s MainActivity
.
If you are using Client Session Tokens (CSTs), this hint is for you.When your user’s CST expires, all Portal SDKs will throw an error on the next MPC Operation the user makes (e.g. creating a wallet, backing up a wallet, recovering a wallet, or signing). For Android, the SDK will throw
PortalHttpUnauthorizedException
which you can use as an indicator to refresh your CST.