ably/ably-flutter

Is there a way to respond to Android device battery optimization settings?

Closed this issue · 2 comments

On Android devices

Settings Menu -> Application Menu -> Select My App -> Battery Menu

If you go into the menu, there are no restrictions, optimization, and restrictions
I think it's usually set to optimization.

If it's set up like this, the network is disconnected when the app goes to the background, is there a way to respond in ably in this case?

┆Issue is synchronized with this Jira Task by Unito

I think library does listen to network state change events => https://github.com/ably/ably-java/blob/main/android/src/main/java/io/ably/lib/platform/AndroidNetworkConnectivity.java. That's why ably goes into disconnected state.

@sacOO7 I think that's correct. If I fix this, I think I can use it on Android devices without any problems. Thank you so much for your kind answers and guidance