dependencies {
// Required
modules {
module("org.bouncycastle:bcprov-jdk15to18") {
replacedBy("org.bouncycastle:bcprov-jdk15on")
}
}
// Wallet-service includes connect-auth-adapter and connect-wallet-connect-adapter by default,
// so there is no need to include them again
implementation("network.particle:wallet-service:$sdkVersion")
}
Manifest Configuration:
Add android:fullBackupContent="@xml/pn_backup_rules" in the application element.
<manifestxmlns:tools="http://schemas.android.com/tools" //add this line > //... <applicationandroid:fullBackupContent="@xml/pn_backup_rules"tools:replace="android:fullBackupContent" > //... </application></manifest>
Initialization:
/** * supportChains is optional, if not provided, all chains will be supported * if provided, only the chains in the list will be supported. * Only the main chain is required; if you want to support the devnet, * you can call showTestNetworks() to display the devnet networks. */val supportChains =mutableListOf<ChainInfo>( ChainInfo.BNBChain, ChainInfo.Ethereum)ParticleWallet.init(application, supportChains).apply {setShowTestNetworkSetting(true) // Default is falsesetShowManageWalletSetting(true) // Default is truehideMainBackIcon() // Hide the back icon in the main pagesetShowAppearanceSetting(true) // Default is truesetShowLanguageSetting(true) // Default is truesetSupportDappBrowser(true) // Default is true}
Setting Wallet Information:
After successfully logging in with Social Login or Wallet Connect, use the following code to set wallet information: