I’m using a JobScheduler to launch JobServices and I’m getting an NPE when I try to access my Application class’ static variables that are initialized in the Application’s onCreate method. I saw this thread in StackOverflow and I have the exact problem:
I also saw this answer by Mark in another Stackoverflow thread (https://stackoverflow.com/questions/54268524/how-can-i-keep-the-job-service-running-when-the-app-is-closed-from-recent-task-l) but the answer mentions Activities or UI elements only. I wonder if the same answer applies to a project’s main Application class.
Any solutions to this? Thanks!