Importing and Initializing
Import the SDK
Add the following imports to your Kotlin file:
import com.example.mpc.MpcClient
Initialize the SDK
Initialize the SDK in your Application
class:
import android.app.Application
import com.example.mpc.MpcClient
import com.example.mpc.Callback
class MyApplication : Application() {
lateinit var client: MpcClient
override fun onCreate() {
super.onCreate()
val client = MpcClient(
context = applicationContext,
apiKey = "YOUR_API_KEY",
serverAddress = "MPC_SERVER_ADDRESS",
accessToken = "YOUR_ACCESS_TOKEN",
mode = "YOUR_MODE",
authServerAddress = "AUTH_SERVER_ADDRESS",
cloudService = CloudService() // You'll need to provide your CloudService implementation or using GoogleService.kt class
)
}
}
Last updated