← Back to team overview

ubuntu-phone team mailing list archive

Re: Find out if running on a phone

 

On Mon, Jan 11, 2016 at 9:08 PM, Lorn Potter <lorn.potter@xxxxxxxxxxxxx> wrote:
>
>
> On 12/01/16 05:35, Robert Park wrote:
>>
>> But the point is that you can't have coffee that says "if desktop: x; if
>> phone: y" because it can change at any time and you can't rely on that.
>
>
> Yes this desktop/phablet mode thing would be dynamic. It can change at any
> time, which is why it needs to be detected dynamically.
>
> When you connect bt keyboard & external display, phone is now in desktop
> mode. When you flip back your laptop's touchscreen, it's it now phablet
> mode. It already does the first one except there is no API to let developers
> know for certain what mode it is in.
>
>>
>> **MUCH** better user experience if you do feature detection, eg "if
>> push_notifications_available: enable_push_notifications()", this way
>> they work everywhere they exist, rather than trying to guess whether or
>> not they exist by making assumptions about what is a "phone" vs what is
>> a "desktop".
>>
>
> It really depends on what you are doing.
>
> We can either provide an API to do so or developers will try and guess these
> things on their own.
>

+1, we need to have a central decision maker that factors in a lot of
inputs (including the user's choice) and provides all other components
with its decision.

Also note that solely considering screen/surface size is likely not
going to cut it, counter example is a large monitor used as a "TV"
(typically 10 ft away from the user). Apps will likely want to adjust
their UI to this specific scenario, as a large monitor could very well
also be used in classic desktop scenario.

Cheers,

  T

>
> --
> 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


References