Android Question Activity and Foreground Service


Active Member
Licensed User
Longtime User
I have an activity and a foreground service.

The foreground service checks if a sms was received and write it to a database.
I receive every hour a sms in the night. This works fine. The modus of the phone is "night mode/sleep"

In the morning if I activate the home screen, I get an error of my app that the "View" has to be
initialized before use.

In my main activity I have created a Listview control in the activity create event and initialized it there.

Should I initialize again in the RESUME event , what makes no sense.