No, you don't need to for this.
Normally, if you had a long running class that needed to survive throughout an Activity lifecycle, putting it in a bound service would work. It would require you to transfer data via IPC. In this case, it shouldn't matter. Since you're dealing with essentially a String
array, you can put it in the Intent
object of the Activity
you're about to start or in a Bundle
which goes in to the Intent
object.
On the creation of the Activity, simply open the Bundle
using the Intent#getExtras()
method and rebuild your list. It won't take much longer to do compared to IPC with a Service
, and it should be significantly easier to maintain.
EDIT:
One thing you can try is to override the Application
object. You have to specify the new entry point in the Manifest
, but if you build the Singleton
from the Application
class and hold the reference there, it should stay alive as long as your app is running. It will be destroyed when you leave though.