I'm somewhat new to Android development and I'm trying to build a very simple app which will browse my network for DLNA servers and allow me to browse each DLNA server as a directory. The thought is pretty simple: one activity displays all DLNA servers on the network, user selects one, then we redirect to another activity which browses the DLNA media server's directories.

My question is quite basic: how do I persist information like 'selected server', 'current directory' and other things like this? I just need a way for the rest of my application to know what to do. Should I build this data into a service? It seems like that violates the common understanding of what services should be. How can I/should I persist application state?

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top