Gabor Varadi
1 min readAug 24, 2020

--

1.) AndroidViewModel gets android.app.Application by design, so Jetpack's authors didn't intend to make it "android-independent"

2.) I've never seen an androidx.lifecycle.ViewModel re-used on a different platform, so while you can technically wrap the NavController in the Activity-scope with your own "Navigator" interface, it's not strictly necessary at all.

--

--

Gabor Varadi
Gabor Varadi

Written by Gabor Varadi

Android dev. Zhuinden, or EpicPandaForce @ SO. Extension function fan #Kotlin, dislikes multiple Activities/Fragment backstack.

No responses yet