pires / android-obd-reader

Android OBD-II Reader application that uses pure OBD-II PID's Java API.
Apache License 2.0
808 stars 467 forks source link

When service is running and you open the notification, it fails to check if the service is running #183

Closed phamels closed 8 years ago

phamels commented 8 years ago

Hi,

I've noticed that when you start the service, the notification is created and the service is actually running, when you click on the notification to return to the main activity, it fails to check if the service is actually running even though it is running.

So if (service != null && service.isRunning()) always returns a false even though it is still running in the background but the main activity thinks it's not and behaves that way, resulting in no communication between the service and activity anymore.

pires commented 8 years ago

@phamels thanks for reporting. Care to open a PR that fixes this?

pires commented 8 years ago

@jbits want to check this one out? ;-)

jbits commented 8 years ago

I can't reproduce it. From what I understand after I go back to the app by clicking on notification (service != null && service.isRunning()) evaluates to false. I don't see it happening. Maybe somebody could explain more clearly what is the issue. I'm fairly new to android.