I am using 0.6.0 library integrated for my multiplatform project and found out it doesnot work with ComponentActivity.
MainActivity which extends ComponentActivity(from official android) cannot be cast to androidx.fragment.app.FragmentActivity
fun BindMyLocationTrackerEffect(locationTracker: LocationTracker) {
val lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current
val context: Context = LocalContext.current
LaunchedEffect(locationTracker, lifecycleOwner, context) {
val fragmentManager: FragmentManager = (context as FragmentActivity).supportFragmentManager // this part has an issue
locationTracker.bind(lifecycleOwner.lifecycle, context, fragmentManager)
}
}
the current solution is to use AppCompatActivity but i want to utilize latest ComponentActivity from android
I am using 0.6.0 library integrated for my multiplatform project and found out it doesnot work with ComponentActivity.
MainActivity which extends ComponentActivity(from official android) cannot be cast to androidx.fragment.app.FragmentActivity
fun BindMyLocationTrackerEffect(locationTracker: LocationTracker) { val lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current val context: Context = LocalContext.current
}
the current solution is to use AppCompatActivity but i want to utilize latest ComponentActivity from android