I've written a download manager app for Android. Now i want to refactor it's structure to MVVM. but i have some questions.
Into what layer I should move downloader
classes such as DownloadManager.java
(which manages download queue, etc), Downloader.java
(which creates an empty file then downloads data and write into that empty file), etc?
into what layer i should move Application
class which is responsible for creating database for the first time?
thanks.
Let's say you have 3 layers,
Downloader.java should be in the Data layer
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.