This documentation provides a comprehensive guide on integrating and utilizing the ParticleConnect SDK in your Android application, with a primary focus on Social Login functionality. ParticleConnect facilitates seamless connectivity and authentication using social media accounts in your mobile applications.
By leveraging Social Login, your users can easily authenticate themselves using their preferred social media accounts, simplifying the onboarding process. Upon successful authentication, ParticleConnect enables you to obtain a web3 wallet address associated with the user's account.
Configuration
To integrate ParticleConnect into your project, follow these steps:
val pnAdapter = ParticleConnect.getAdapters().first { it.name == MobileWCWalletName.Particle.name }val config =ParticleConnectConfig( loginType = LoginType.EMAIL, supportAuthTypeValues =SupportAuthType.PHONE.value or SupportAuthType.GOOGLE.value or SupportAuthType.FACEBOOK.value
)pnAdapter.connect(config, object : ConnectCallback {overridefunonConnected(account: Account) {//current chain address,//if current chain is evm chain, it is 0x address, //if current chain is solana chain, it is base58 addressval address = account.publicAddress }overridefunonError(error: ConnectError) {//handle error }})
Conclusion
This concludes the integration of ParticleConnect into your Android application with a focus on Social Login, enabling you to effortlessly obtain a web3 wallet address through the authentication process.