What is the correct Device Definition for Google Glass (for a simulator in Eclipse or Android studio)?
Asked Answered
G

3

18

Yes I will test on the actual device (when it arrives) but would be nice to know now:

How to setup a device definition so I can run an emulator that is something like glass.

Critical are:

Size: What size does glass "report" itself as: Small, Normal, Large, XLarge

Screen Ratio: notlong or Long?

Density bucket: xxhdpi? or what?

Other: does setting it up for DPad input help at all or come close to the nav on Glass? Other tips?

Note: Yes I know about the mirror API playground, but I'm developing APKs not mirror-api.

Guillermo answered 28/8, 2013 at 14:1 Comment(0)
G
17

DisplayMetrics gives this output on Glass Explorer edition:

DisplayMetrics{density=1.5, width=640, height=360, scaledDensity=1.5, xdpi=180.62222, ydpi=169.33333}

So it does indeed look like hdpi.

Also the screen size is small:

....
else if ((getResources().getConfiguration().screenLayout &      Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_SMALL) {     
               Log.d(TAG,"SMALL screen");
           }

And it is "notlong"

Guillermo answered 1/9, 2013 at 23:20 Comment(0)
M
13

I created an AVD with the following specs:

Screen Size: 3" Resolution: 640x360 RAM: 682 MB Size: Small Screen Ratio: notlong Density: hdpi

and its a pretty good representation of my Glass, though its not perfect. I don't know what the exact screen size should be but with that resolution and density, looking at XML layouts in the Graphical Layout Preview look accurate.

Meggs answered 6/9, 2013 at 17:23 Comment(2)
Are you able to debug the demo GDK apps on an AVD created this way, or is it just for layout testing?Prebo
We weren't creating a GDK app actually, it was for a regular Android application. Yes, the original intent was for layout previewing in Eclipse.Meggs
C
0

As for Enterprise Edition 2, according to Tech Specs, I configured new hardware profile for virtual device as following:

Hardware profile: enter image description here System image: enter image description here

Crippling answered 3/6, 2020 at 8:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.