QuickPermissions/QuickPermissions-Kotlin

Fatal Exception: java.lang.IllegalStateException : No support from any classes other than AppCompatActivity/Fragment

Opened this issue · 0 comments

Fatal Exception: java.lang.IllegalStateException: Found android.app.ContextImpl : No support from any classes other than AppCompatActivity/Fragment
at com.livinglifetechway.quickpermissions_kotlin.PermissionsManagerKt.runWithPermissionsHandler(PermissionsManager.kt:152)
at com.livinglifetechway.quickpermissions_kotlin.PermissionsManagerKt.runWithPermissions(PermissionsManager.kt:23)
at com.bluecrunch.base.permissions_checking.LocationPermissionManager.askForForegroundLocationPermission(LocationPermissionManager.kt:32)
at com.bluecrunch.base.permissions_checking.LocationPermissionManager.requestLocationPermissionFor(LocationPermissionManager.kt:22)
at com.bluecrunch.microfinance.ui.maps.google.presentation.GoogleMapActivity.handlePermissionNotGranted(GoogleMapActivity.java:315)
at com.bluecrunch.microfinance.ui.maps.google.presentation.GoogleMapActivity.handleLocationResult(GoogleMapActivity.java:286)
at com.bluecrunch.microfinance.ui.maps.google.presentation.GoogleMapActivity.subscribeToLiveData$lambda-10(GoogleMapActivity.java:172)
at com.bluecrunch.base.BaseActivity$$InternalSyntheticLambda$0$ff4710b7aabc990dfac0223896b0686b79b5241f4721d0e59926a80db7746231$0.onChanged$bridge(BaseActivity.java:53)
at androidx.lifecycle.LiveData.considerNotify(LiveData.java:133)
at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:151)
at androidx.lifecycle.LiveData.setValue(LiveData.java:309)
at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:50)
at com.bluecrunch.microfinance.ui.maps.google.presentation.GoogleMapViewModel$getLocationPermissionStatus$1$1.invokeSuspend(GoogleMapViewModel.kt:44)
at com.bluecrunch.microfinance.ui.maps.google.presentation.GoogleMapViewModel$getLocationPermissionStatus$1$1.invoke(GoogleMapViewModel.kt:5)
at com.bluecrunch.microfinance.ui.maps.google.presentation.GoogleMapViewModel$getLocationPermissionStatus$1$1.invoke(GoogleMapViewModel.kt:5)
at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit(Collect.kt:136)
at kotlinx.coroutines.flow.FlowKt__ErrorsKt$catchImpl$$inlined$collect$1.emit(Collect.kt:136)
at kotlinx.coroutines.flow.internal.SafeCollectorKt$emitFun$1.invoke(SafeCollector.kt:15)
at kotlinx.coroutines.flow.internal.SafeCollector.emit(SafeCollector.kt:77)
at kotlinx.coroutines.flow.internal.SafeCollector.emit(SafeCollector.kt:59)
at com.bluecrunch.microfinance.location_tracking.data.remote.LocationRemoteDataSource$getCurrentLocation$2.invokeSuspend(LocationRemoteDataSource.kt:54)
at com.bluecrunch.microfinance.location_tracking.data.remote.LocationRemoteDataSource$getCurrentLocation$2.invoke(LocationRemoteDataSource.kt:2)
at kotlinx.coroutines.flow.SafeFlow.collectSafely(SafeFlow.java:61)
at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:212)
at kotlinx.coroutines.flow.FlowKt__ErrorsKt.catchImpl(FlowKt__ErrorsKt.java:230)
at kotlinx.coroutines.flow.FlowKt.catchImpl(FlowKt.java:1)
at kotlinx.coroutines.flow.FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1.collect(SafeCollector.common.kt:113)
at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.collect(SafeCollector.common.kt:114)
at kotlinx.coroutines.flow.FlowKt__ReduceKt.firstOrNull(FlowKt__ReduceKt.java:252)
at kotlinx.coroutines.flow.FlowKt.firstOrNull(FlowKt.java:1)
at com.bluecrunch.microfinance.ui.maps.google.presentation.GoogleMapViewModel$getLocationPermissionStatus$1.invokeSuspend(GoogleMapViewModel.kt:45)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:367)
at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(CancellableKt.java:30)
at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(CancellableKt.java:25)
at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.java:110)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(BuildersKt__Builders_commonKt.java:56)
at kotlinx.coroutines.BuildersKt.launch(BuildersKt.java:1)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(BuildersKt__Builders_commonKt.java:47)
at kotlinx.coroutines.BuildersKt.launch$default(BuildersKt.java:1)
at com.bluecrunch.microfinance.ui.maps.google.presentation.GoogleMapViewModel.getLocationPermissionStatus(GoogleMapViewModel.java:36)
at com.bluecrunch.microfinance.ui.maps.google.presentation.GoogleMapActivity.getLocation(GoogleMapActivity.kt:167)
at com.bluecrunch.microfinance.ui.maps.google.presentation.GoogleMapActivity.initMapFragment$lambda-2(GoogleMapActivity.java:103)
at com.bluecrunch.microfinance.ui.maps.google.presentation.GoogleMapActivity$$InternalSyntheticLambda$0$7fb1e2ceeddf1f7420af5179f2f71a47bdd4f4f48ab083a7669329bb2f20d7c4$0.onMapReady(GoogleMapActivity.java:12)
at com.google.android.gms.maps.zzat.zzb(com.google.android.gms:play-services-maps@@18.1.0:1)
at com.google.android.gms.maps.internal.zzar.zza(com.google.android.gms:play-services-maps@@18.1.0:6)
at com.google.android.gms.internal.maps.zzb.onTransact(com.google.android.gms:play-services-maps@@18.1.0:3)
at android.os.Binder.transact(Binder.java:1085)
at ex.c(ex.java:2)
at com.google.maps.api.android.lib6.impl.bg.run(bg.java:1)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:233)
at android.os.Looper.loop(Looper.java:344)
at android.app.ActivityThread.main(ActivityThread.java:8204)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:589)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1071)