RightMesh / meshIM

An on- or off-line messaging app powered by RightMesh!
GNU General Public License v3.0
17 stars 8 forks source link

RightMesh not closing when app is offline. #26

Closed FrazerSeymour closed 6 years ago

FrazerSeymour commented 6 years ago

Another step in the continuing saga of the service/client/RightMesh lifecycle drama.

Since we changed the app to only unbind on activity destroy, the service was staying alive (though not in the foreground) until the activity was swipe-killed.

This PR changes things so the it unbinds on activity stop, so that the service can come to a full stop (RightMesh included) when the app isn't in the foreground. To try to mitigate the issues we were having previously I have made the service not set the callback to null on unbind, so that the AIDL link (hopefully) isn't broken during the rapid unbind/bind process.