Device using?


#1

Hello everyone,

Is there any way to discovery which device the person is using to zap? I remember of an old function that does this and also a warning about it can be possible removed from zapworks anytime.

att, Higão.


#2

;-; anyone?


#3

Hi higor!

Do you mean iOS vs Android, or device model etc? If so I don’t believe we have a function exposed to do this at the moment but it’s a good feature request :slight_smile: Let us know which particular bits of data you’re looking for and we can see what we can rustle up!

Cheers,
Connell


#4

On Zapworks Studio you can select devices simulation to see how it looks against different devices. I believe Higor wants that information to be available in run time to set the layout based on the phone the user is using.


#5

My initial ideia with this is:

If I’ve a layout that I can’t cut it to do the RelativeTo thing, I could recognize the device and do a check like:

if(Z.device().UsingDevice("Samsung 8+")){
    //or use a controller for this what I think
    //more valid to let this function generic   
    groupAll.scale([1.2,1.2,1.2]);
}

With this simple string check, I could make my elements that I can’t cut, be adjusted to the format screen of the using device. This is very common on the notseen version of the experience.

When it comes to the screen with all the layout and etc, a very good practice is let the main group scaled to the format of a IPAD2+, so in this way the project will fits well in all other screens but in a smaller version (what I think very bad and made me think on this a couple of years back).

If this could happen would be very cool and I think beneficial for everyone who thinks about this minimal details and experience.

att, Higão.