← Back to team overview

ubuntu-phone team mailing list archive

Re: Find out if running on a phone

 

On 16-01-11 06:57 AM, Jani Monoses wrote:
> 
>     You should not do that... Why do you even want to know?
> 
> Whether the app is running on the phone vs desktop?
> 
> * to use different QML since the same QML code cannot (yet) work on both
> * to use the content-hub for getting a file vs doing a regular file open dialog
> * to load contacts from the content-hub vs from another source that is desktop specific
> * to enable push notifications or not
> * to assume a different role (master or slave device of the same account)

Just so you know, the difference between a desktop and a phone is that when you unplug an external monitor and input
devices from your phone it is no longer a desktop, but a desktop stays a desktop.

If you're developing software *right now* making any other assumptions about phone vs. desktop, you're writing bad code
and breaking things in a highly undesirable way.


-- 
Stephen M. Webb  <stephen.webb@xxxxxxxxxxxxx>


Follow ups

References