Open aiueoH opened 5 years ago
Can you show those crashes?
Possible in theory bizarre in practicality.
Yes it will some times. We faced the same issue. You should use context.getApplicatinContext when it requires to place some thing global level. You can use them for things like toast etc but not for creating UI etc.
Can you show those crashes?
It happened on a few devices. I can't reproduce.
Services are running in a different sandbox from the app, having a service running doesn't guarantee keeping the app alive. You might have to change your approach of "setting things globally" -> Broadcast, sharedpreferences ...Etc
According to this page Understanding the Android Application Class
So the application will be released when somes components is alive? My app has some crash reports caused by application null pointer exception in service.