I'm creating an android app using kotlin and arcgis_runtime_android_sdk, and i've faced a problem that i couldn't find solution to.
I want to create a sceneView to show 3d objects inside my app, I've followed the official tutorials on the esri website but this error always occur while running the app:
I/Choreographer: Skipped 196 frames! The application may be doing too much work on its main thread.
the app just freeze and became unusable, I tried to use kotlin coroutine as it's the recommended way by android:
I used semthing like this:
runBlocking{
launch {
setApiKeyForApp()
setupScene()
}
}
// AND I USED
CoroutineScope(Dispatchers.Default).launch {
setApiKeyForApp()
setupScene()
}
my setupScene function is:
fun setupScene() {
val portal:Portal = Portal("https://www.arcgis.com", false)
val itemId:String = "<webScene id>"
val portalItem:PortalItem = PortalItem(portal, itemId)
sceneView.scene = ArcGISScene(portalItem)
}
I don't what to do, please help.