Welcome Guest Search | Active Topics | Sign In | Register

Create a mobile/tablet enumerator using EO web browser Options
yleung
Posted: Friday, September 19, 2014 1:41:58 PM
Rank: Advanced Member
Groups: Member

Joined: 4/2/2014
Posts: 37
Dear support,

I have a project to create a mobile/tablet enumerator. The enumerator consists of two things. A background image is a picture of a phone/tablet. On top of it, I put your EO web browser. So when a mobile web page is loaded on this browser, users can see how the page should look like on mobile/tablet.

My question is about device-width on media queries. On a real iphone, the device-width on media queries is 320px. On a real iPad, it is 1024px. On the EO browser on the enumerator, it is 1920px. I know this is the real device-width of my 27 inches screen. Is it possible to tweak this number to match to real iphone or ipad?

Thanks

eo_support
Posted: Friday, September 19, 2014 3:29:35 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

I believe Chrome naively has this ability but that portion is not exposed through our API. The feature Chrome has can be accessed through development tools UI Device Simulation tab. That feature exists in our build as well (you can either call WebView.ShowDevTools or use the remote debug feature to access the development tools UI) however in the current build there is no way for you enable emulation programmatically. We will look into it and see if it is possible for us expose it in a simple yet useful way.

Thanks!
David Robinson
Posted: Sunday, March 6, 2016 2:13:24 PM
Rank: Advanced Member
Groups: Member

Joined: 4/6/2015
Posts: 33
Any success to your investigation? Would be nice to be able to do this.
Thanks
eo_support
Posted: Sunday, March 6, 2016 5:08:35 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Unfortunately we still do not have any public API for you to do this yet. Sorry about it!
David Robinson
Posted: Sunday, February 4, 2024 6:55:43 AM
Rank: Advanced Member
Groups: Member

Joined: 4/6/2015
Posts: 33
Any hope of a device emulation API?
eo_support
Posted: Monday, February 5, 2024 10:20:59 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

No. We have looked into this and decided against it. There are two reasons. The first is the DevTools device emulation UI is an UI and it does not have any built-in API to drive it. So we would have to introduce a new set of API first.

The second reason which is more important because ultimately device emulation comes down to customizing two things (there are a few other things such as screen DPI that are less important):

1. Screen size;
2. User agent;

Both can already be customized through our existing API. So there is no need to introduce another set of API to over complicate things.

Thanks!
David Robinson
Posted: Monday, February 5, 2024 3:12:20 PM
Rank: Advanced Member
Groups: Member

Joined: 4/6/2015
Posts: 33
Does this mean that we set CustomUserAgent, that that is what will show up as navigator.userAgent?
eo_support
Posted: Monday, February 5, 2024 3:14:40 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Yes. That's what that property is for.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.