2 years ago

#65335

test-img

Raju Pathak

using Viewmodel in service class with UI

I am working on a custom keyboard app that uses Inputmethod service class and has the keyboard UI. As I have read on a comment in Github " ViewModel should be used closely with an Activity or a Fragment". https://github.com/android/architecture-components-samples/issues/137#issuecomment-327854042 Does that mean we cannot use viewmodel in service class with UI like InputmethodService class and Why?

android

viewmodel

0 Answers

Your Answer

Accepted video resources