heedy / connectordb-android

The ConnectorDB android app
Apache License 2.0
8 stars 2 forks source link

Oreo: Service IllegalStateException, and crashes #11

Open dkumor opened 5 years ago

dkumor commented 5 years ago

The app is crashing on some oreo devices due to changes in the background APIs: ConnectorDB's background service is not permitted to start:

https://stackoverflow.com/questions/46445265/android-8-0-java-lang-illegalstateexception-not-allowed-to-start-service-inten

This needs to be fixed. My personal phone does not have oreo, so it does not show this issue. A workaround is manually starting the app after the background service crashes (so that it is in foreground, and is allowed to start background services).

dkumor commented 5 years ago

This is due to the granular permissions in newer android versions. A workaround is to add the permissions to the app manually (location and body sensors).

The app will need to update APIs for getting data, since the old ones do not ask for permission.