<android.app.contextimpl cannot be cast to android...
# stackoverflow
u
android.app.contextimpl cannot be cast to android.content.contextwrapper I created a SDK for sms syncing import android.content.Context import android.content.ContextWrapper import android.app.Application import android.view.View import androidx.lifecycle.LifecycleOwner import androidx.lifecycle.Observer import androidx.work.* fun Context.lifecycleOwner(): LifecycleOwner? { var curContext = this var maxDepth = 20 while (maxDepth-- > 0 && curContext !is LifecycleOwner) { curContext = (curContext as ContextWrapper).baseContext } return...