Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve attempts to re-connect by listening for connectivity changes #98

Open
ocram opened this issue May 18, 2016 · 1 comment
Open

Comments

@ocram
Copy link
Contributor

ocram commented May 18, 2016

When the device loses its internet connection, we do currently queue the messages that cannot be send. The library will then try to re-connect several times. If it fails every time, the library will just stop trying and disconnect. If connection can be re-established, the queued messages are dispatched.

We could enhance the process of trying to re-connect by listening for connectivity changes. This could be more efficient. The required permission <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> will not always be there, but when it is, we can use a broadcast receiver for <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />.

@rakirox
Copy link

rakirox commented May 19, 2016

I'll to do it my self. Hope it works 👍

My fast solution it's to aim the broadcast with the singletonMeteor to control this event. Let me implement it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants