← Back to team overview

ubuntu-phone team mailing list archive

Re: "Can I use the internet?"

 

On 08/01/2013 09:44 AM, Iain Lane wrote:
> On Tue, Jul 30, 2013 at 10:17:42AM -0400, Tony Espy wrote:
>> […]
>> So...  I guess the next question is does the platform API currently have
>> the functions you need ( eg. GetTimeZone(), GetCurrentTime() )?  If so,
>> perhaps we can implement a short-term solution for how these functions
>> are implemented until the timed solution is ready?
> 
> Hmm, not sure - where can I see the API documentation for this?
> 
> You can see what the design asks me to implement[0] — for that I need to
> know the things I asked in this thread
> 
>   1. Am I connected to the internet?
>   2. Do I have location detection?
>   3. Do I have data from my mobile carrier?

OK, thanks for the reply, I thought you were ignoring me.  ;)-

After a more careful reading of [0], I have a better understanding of
what you're trying to implement.

That said, I think there are some issues with the the design that
warrant further discussion.

As I mentioned earlier, AFAIK, the only automatic provisioning of time
zone information comes from a NITZ message which includes the following
data:

"yy/mm/dd,hh:mm:ss(+/-)tz,dt"

Furthermore, this message is never received over Wi-Fi, and AFAIK
doesn't require a cellular data connection.

There are problems however with relying on just the NITZ messages.
First, it's not universally supported by operators. Second, some of the
fields are optional, so it's possible that "tz" may not be included in
the messages.  Third, although the NITZ messages include "time", the
accuracy is only required to be "in the order of minutes".  See [a] for
more details.

AFAIK, this is the only mechanism available to set the "time-zone"
automatically. Again, as mentioned before, Android has a hack that
attempts to set time zone automatically based upon the currently
registered operator in cases where NITZ is not supported and/or known to
inaccurate.

It'd be possible to do a time-zone lookup based upon GPS location,
although this would be complicated...

As for automatic "time" updates, besides NITZ, the two mechanisms I'm
aware of are GPS, and NTP, the latter being the only requiring a "data"
connection.

Finally, I'd like my phone to just do this stuff for me automatically,
however in the case where my phone is "offline", do I really need the
"Time & Date" settings page to tell me?  In general my phone is offline
when I tell it to be ( eg. "airplane mode" ), or when I'm away from home
and my phone is roaming ( and "data while roaming" is disabled ).
In these cases, I may choose manually override the time zone, or leave
it as is ( again like when I'm on an airplane ).  I rarely say, "Oh my
phone is offline, I need to do something about that...".

I honestly think that this portion of the page is of lower priority than
the actual time zone/time update mechanisms, which as described above
are a bit of a mess.  This is the reason we've started to investigate
'timed' as a backend.  You asked what does the API look like to access
'timed', and this is where I say we need someone from the SDK team to
address this.

> I suppose to some extent they're influenced by what the backend does.
> It's (as I said earlier in the thread) what actions can the user take to
> get the time set for them automatically? The design assumes that's
> trying to get WiFi, cellular data and location detection. So I need APIs
> to tell me if those things are available.
> 
> If that's not accurate, please could you work with mpt to update the
> design?

Yes, I will do so.  Also, we had a discussion yesterday about
indicator/systems settings backends, but didn't manage to get to "Time &
Date".  We're supposed to have a follow-on discussion for the areas that
weren't covered, so it sounds like we have much to discuss ( including
definition of the time/date portion of the platform API ).  ;)-

One last comment, although IMHOP I don't think "Time/Date" needs to
worry about "network accessibility", I do agree with others that this is
something that should be exposed in our SDK, so we need an owner for
this, and need to assess where it currently stands, and then determine
how much work it needs.

Regards,
/tony

[a] http://en.wikipedia.org/wiki/NITZ

> [0] https://wiki.ubuntu.com/TimeAndDate#Phone



Follow ups

References