← Back to team overview

ubuntu-phone team mailing list archive

Re: "Can I use the internet?"

 

On Tue, 2013-07-30 at 10:44 +0100, Iain Lane wrote:

> In implementing the Time and Date settings[0], I need to know how to
> answer the question in the subject. We have NM's D-Bus API - does that
> cover all cases (mobile data, flight mode, containment [ok, that's not
> relevant for system settings, but more generally], ...) or is there
> something else to use here?


To be clear, you shouldn't use the D-Bus API, but instead the library. 

You can check to see whether wireless is enabled/disabled and where the
connectivity is coming from using those APIs.  You probably just want
the functions on the NM.Client object.  I can help you with specific
snipets if you're looking for a particular value.


>   - If there's no carrier selected - check [0] for unregistered/denied
>     (via ofono-qt as it's bound there)?
>   - If there's a carrier selected but there's no data connection. I
>     guess this is either if there isn't a data signal or if the user has
>     disabled it.


I'm a bit confused on why you need these, I don't see where in the spec.
Just checking to see if the wireless is connected is unfortunately not
enough for timezone detection, as some networks don't provide it.  For
instance, I believe last time I was in Germany they did not.  Sad that
isn't just part of the GSM spec, but eh, I guess some people really want
to save data.

Ted

Attachment: signature.asc
Description: This is a digitally signed message part


Follow ups

References