traccar / traccar-client-android

Traccar Client for Android
https://www.traccar.org/client
Apache License 2.0
660 stars 732 forks source link

android.os.DeadObjectException android.os.BinderProxy.transactNative #384

Open fredpdeveloper opened 5 years ago

fredpdeveloper commented 5 years ago

The service stops after some active hours, this happens in Samsung Galaxy J4 (j4lte), Android 8.0, because they do not handle the service with jobintentservice?

tananaev commented 5 years ago

Can you provide some more details?

fredpdeveloper commented 5 years ago

The error it generates is as follows. image

It may be because of the oreo version because of what I've been reading, because after a few hours the operating system stops the service (it may be a battery consumption), and when it opens again, the application tries to find the instance of the service, but it was destroyed by the operating system produces the error, see this link to see the subject of the service in the background https://blog.klinkerapps.com/android-o-background-services/, Thank you

tananaev commented 5 years ago

How did you come to this conclusion from the provided stack trace?

fredpdeveloper commented 5 years ago

replicating the problem, the case is this device has a battery optimization (if I press that button the app sends that error and the same is executed automatically), try to optimize the life of the phone and thus closes the service without going through the destroy , so when trying to start the application and without having a reference to the service it falls, it is something that is happening recursively, this happens to me with android 8.0 and there are many issues open for the same case, another reference : http://www.itdaan.com/blog/2017/01/12/6154fd6b0286.html

tananaev commented 5 years ago

I know what battery optimisation is and how it works, but I don't think it should cause a crash. Still I don't see any evidence that it's the case. You just making a guess that your crash is somehow related to battery optimisation.