Integration with Avataar Experience > Integration with Android Renderer

Integration with Android Renderer

Pre-requisites:

  • Android Studio - A developer’s tool to build the application.



Integration : 

  1. To include the JitPack repository in your project, add the following code at the end of the repositories section in your root build.gradle or settings.gradle file:


allprojects {

    repositories {

        ...

        maven { url 'https://jitpack.io' }

    }

}



2. Include the following dependency in your build.gradle (Module.app) to integrate the library: 

dependencies {

    implementation 'com.github.SoulVisionCreations:gemini-android:1.1.7'

}


3. To open Avataar's experience, add the following code at the desired location where you want to integrate the 3D experience:


val intent = Intent(this, PolluxActivity::class.java)

intent.putExtra("configUrl", "Value of configUrl")

intent.putExtra(“token”,”Authentication token”)

startActivity(intent)


Note : 

  • Please ensure to replace the "Value of configUrl" with the actual configUrl which can be copied from Avataar Web Application. 

  • The authentication token has to be replaced by actual authentication token which will be provided from Avataar team.  

Sample : 

Here's a sample code demonstrating the entire integration, where we enable the Avataar experience as a different activity: