Im working on a project which requires me to do some uploading when the connectivity changes. Im a writing an android and iOS app using Xamarin. I know in iOS there are huge restrictions using background tasks. Also in iOS there is no way, unlike android, to subscribe to a receiver such as connectivitychanged.
So im looking for a work around without abusing different API's. I don't mind a scheduled task every n minutes, but im not sure if this is possible.
What i've done so far:
Is there any work arounds that people have come across. I don't mind trying to convert iOS code into xamarin/c#.
Thanks.
You may have solved this already but here's what I did (Xamarin Forms)...
I simply used: http://www.nuget.org/packages/Xam.Plugin.Connectivity Installed it in my Common and Platform specific projects
and in my Application.cs, right after I set the MainPage, I used
Connectivity.Plugin.CrossConnectivity.Current.ConnectivityChanged += async (sender, args) =>
{
if (args.IsConnected)
{
...
...
}
...
}