A full blown demo project for connecting and maintaining a long running background Xmpp connection, on Android, with Xamarin and Sharp.Xmpp. Code sample includes:
- A "Sticky" Intent Service, for long running tasks. See full explanation at this dedicated codeproject article
- Network reconnection events monitoring, in C#, for checking connection connectivity, and reconnecting.
- Scheduling repeating Android alarms, in C#, in order to schedule XMPP background pings, making sure the connection is live.
- Wakelocks, in C#, in order to make sure that long running tasks such as file transfers, or initial reconnections, are able to complete before the Android device sleeps.
- Improved detection of broken TCP connections by Sharp.Xmpp
Download and enjoy. You can contact me at pgstath@gmail.com or through Github.
2015-2016 Panagiotis Stathopoulos