← Back to team overview

ubuntu-phone team mailing list archive

Re: Find out if running on a phone

 



On 12/01/16 04:56, Stephen M. Webb wrote:
On 16-01-11 01:26 PM, Lorn Potter wrote:

imho, we need some way that contained apps know if the device is desktop or phablet mode, which I assumed the QInputInfo
API was helping to detect. Right now, phablet mode becomes desktop mode when adding a bluetooth keyboard. Where as it
probably should be keyboard + external display on small display, because windowed mode on small screen is horrible to use.

We need contained apps to be written in such a way that they don't need to know if they are on a phone, tablet, a
laptop, or a desktop.  They should only need to know that they have a certain size of display surface to render to.

Yes, there are exceptions for things that need certain hardware.  A step counter needs an accelerometer, for example.
Just the like one I have in my Lenovo Yoga 2 Pro laptop.  Detecting available codecs in a gstreamer pipeline might also
qualify.  None of these are phone/desktop checks, they're checks for available system functionality.  *Thats* where
solutions need to live, not in an unreliable and poorly-defined proxy like "form factor."

Form factor is the basis for how we use and interact with these things.
This review even points out use cases for desktop/phablet mode, detected in part with the accelerometer (yay!):
http://www.theverge.com/2014/2/5/5377754/lenovo-yoga-2-pro-review


There is just no such thing as a phone or a desktop as separate entities.

Maybe not below the UI, but the UI sure needs to be different. In this respect they are different, in the least to the user.

I can turn my phone into a desktop at any
time, and I have laptops I can turn into a tablet at any time.  There is only one Ubuntu Personal.


I think you just argued for having phablet/desktop mode and a need to detect it, otherwise your phone would already just be a desktop and would not need to 'be turned into' one. It's a dynamic thing. and it's because there is only one Ubuntu Personal that we need mode detection to allow developers to optimize their apps for the different use cases of different form factors.



Follow ups

References