[MonoTouch] Webservice no internet connection

Nic Wise nicw at fastchicken.co.nz
Fri Oct 28 05:32:51 EDT 2011


It should throw an exception. Or it will time out.

Do the call in another thread, and then have yet another thread
watching it if its a problem. You should not be doing the webservice
call on the UI thread anyway...

2011/10/28 Andreas Ploetzeneder <info at ploetzeneder-it.com>:
> Ok :)  cool, and if internet connection breaks during connection? :/
>
> 2011/10/28 Nic Wise <nicw at fastchicken.co.nz>
>>
>> I do this:
>>
>> public static bool IsReachable (string host)
>>               {
>>                       return Reachability.InternetConnectionStatus
>> () != NetworkStatus.NotReachable &&
>>                                       Reachability.IsHostReachable (host);
>>
>>               }
>>
>> and I pass in "app.londonbikeapp.com"
>>
>> Works 100% of the time for me :) Has since 3.x :)
>>
>> The reachability stuff is here:
>>
>>
>> https://github.com/xamarin/monotouch-samples/blob/master/ReachabilitySample/reachability.cs
>>
>> 2011/10/28 Andreas Ploetzeneder <info at ploetzeneder-it.com>:
>> > How can i generally handle "no internet connection" and web services?
>> >
>> > --
>> >
>> >
>> >
>> >
>> >
>> > Mit freundlichem Gruß,
>> >
>> > Andreas Plötzeneder
>> > CEO
>> > ihr ploetzeneder it-solutions Team
>> > Mobile Development – Desktopanwendungen – Webanwendungen
>> > Tel:  +43 720 30 30 24 10
>> > Fax: +43 720 30 30 24 20
>> > Email: info at ploetzeneder-it.com
>> > web:   http://www.ploetzeneder-it.com
>> >
>> > Der Inhalt dieser E-Mail samt aller Anhänge ist vertraulich
>> > und ausschließlich für den Adressaten bestimmt. Wenn Sie nicht der
>> > vorgesehene Adressat dieser E-Mail oder dessen Vertreter sind, so
>> > löschen
>> > sie diese bitte und informieren Sie den Absender. Jede Form der
>> > Verbreitung
>> > oder Veröffentlichung der E-Mail, sei es in ihrer Gesamtheit oder in
>> > Teilen,
>> > die nicht ihrem Zweck dient, ist unzulässig. Das Internet kann die
>> > Unversehrtheit dieser Mitteilung nicht garantieren. ploetzeneder
>> > it-solutions übernimmt daher keine Haftung, falls die E-Mail geändert
>> > wurde.
>> >
>> >
>> >
>> > _______________________________________________
>> > MonoTouch mailing list
>> > MonoTouch at lists.ximian.com
>> > http://lists.ximian.com/mailman/listinfo/monotouch
>> >
>> >
>>
>>
>>
>> --
>> Nic Wise
>> t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
>> b. http://www.fastchicken.co.nz/
>>
>> Nearest Bus: find when the next bus is coming to your stop.
>> http://goo.gl/Vcz1p
>> mobileAgent (for FreeAgent): get your accounts in your pocket.
>> http://goo.gl/IuBU
>> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
>> London Bike App: Find the nearest Boris Bike, and get riding!
>> http://goo.gl/Icp2
>> _______________________________________________
>> MonoTouch mailing list
>> MonoTouch at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
>
> --
>
>
>
>
>
> Mit freundlichem Gruß,
>
> Andreas Plötzeneder
> CEO
> ihr ploetzeneder it-solutions Team
> Mobile Development – Desktopanwendungen – Webanwendungen
> Tel:  +43 720 30 30 24 10
> Fax: +43 720 30 30 24 20
> Email: info at ploetzeneder-it.com
> web:   http://www.ploetzeneder-it.com
>
> Der Inhalt dieser E-Mail samt aller Anhänge ist vertraulich
> und ausschließlich für den Adressaten bestimmt. Wenn Sie nicht der
> vorgesehene Adressat dieser E-Mail oder dessen Vertreter sind, so löschen
> sie diese bitte und informieren Sie den Absender. Jede Form der Verbreitung
> oder Veröffentlichung der E-Mail, sei es in ihrer Gesamtheit oder in Teilen,
> die nicht ihrem Zweck dient, ist unzulässig. Das Internet kann die
> Unversehrtheit dieser Mitteilung nicht garantieren. ploetzeneder
> it-solutions übernimmt daher keine Haftung, falls die E-Mail geändert wurde.
>
>
>



-- 
Nic Wise
t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/

Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2


More information about the MonoTouch mailing list