I’m new to java and android and I hope this is not a stupid question…
My android project has an activity, a service, and a separate class file containing static variables.
The activity and the service both reference the variables and everything works ok when running in the emulator.
But in the real world, the activity will often be destroyed while the service is left running.
Will those static variables in the class still be there and referencable by the service?
thanks, Gary
Yes, the class with static variables is independent of your Activity and your Service. Both will be able to access it regardless of whether the other is running or not.