What role an Android Service should play in the MVP pattern?

后端 未结 3 772
臣服心动
臣服心动 2021-02-05 23:19

I am developing an Android app that does Human Activity Recognition.

It basically works like that - Service constantly reads the accelerator data and stores the recogniz

3条回答
  •  [愿得一人]
    2021-02-06 00:10

    This article helped me in a similar situation, although may not be exactly yours, the idea is the same:

    https://android.jlelse.eu/android-bound-services-and-mvp-12ca9f70c7c7

    Basically, the author works around the fact that a bound service is tightly coupled to an activity, and it adds extra lifecycle calls to it.

提交回复
热议问题