Sebastian Lehrbaum
07/31/2024, 9:19 AMFrank Bouwens
07/31/2024, 9:27 AMChrimaeon
07/31/2024, 9:34 AMonCreate
? Do you have it reproducible? Which Android Version? Which device?
The Service’s lifecycle needs onCreate
before onDestroy
is called.Chrimaeon
07/31/2024, 9:34 AMChrimaeon
07/31/2024, 9:38 AMlateinit
for those kind of properties. If its an Activity
, a Service
or a BroadcastReceiver
, no matter, we never had issues with that.Sebastian Lehrbaum
07/31/2024, 9:43 AMSebastian Lehrbaum
07/31/2024, 9:43 AMChrimaeon
07/31/2024, 9:44 AMMichael Krussel
07/31/2024, 11:44 AMonCreate
and cleanup in onDestroy
make that class nullable, and the only null checks are in the service and no lateinits.