ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #18951
Re: How to check if internet is connected
Thanks Dan for the link, can you please point to a client implementation of
this API ? that will help a lot.
On Sun, Mar 20, 2016 at 4:08 PM, Dan Chapman <dpniel@xxxxxxxxxx> wrote:
> On Sunday, 20 March 2016 09:50:18 GMT, Omer Akram <om26er@xxxxxxxxxx>
> wrote:
>
>> Hi!
>>
>> I am writing a very simple utility in which I need to check if a network
>> connection is currently established or not. For example if wifi or data
>> connection is connected. At the same time I would also like to know if I
>> can use a signal for change in network connectivity e.g. when wifi is
>> connected/disconnected or when data connection is connected/disconnected.
>>
>> Right now I only care about the connection establishment and not really
>> about if there is internet connectivity. I can of course check that by
>> pinging a server
>>
>> Any code samples would help largely.
>>
>> Thanks!
>>
>>
> The Ubuntu.Connectivity api should provide what your looking for. Seems
> the docs haven't been updated on d.u.c with the recent changes, but you can
> see the available network properties here
> http://bazaar.launchpad.net/~indicator-applet-developers/indicator-network/trunk/view/head:/src/connectivity-api/connectivity-qt/connectivityqt/connectivity.h
>
> BR
>
> Dan
>
>
> --
> Sent using Dekko from my Ubuntu device
>
> --
> Mailing list: https://launchpad.net/~ubuntu-phone
> Post to : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ubuntu-phone
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References