6

I'd like to make my app more friendly for e-ink screens, i.e. reducing gradients, removing animations etc. Before I can add separate layouts for those screen types, I first need a way to detect them. Did somebody find a good way to do this?

The Display class doesn't look like it's providing a way to detect the display type...

Edit: By e-ink screen, I mean a screen that works with the e-paper technology.

Flo
  • 2,309
  • 20
  • 27
  • 1
    Have you tested the `getRefreshRate()` method? Usually ePaper displays are slower than LCD/OLED displays. – Robert Mar 05 '13 at 10:59
  • your que lacks in explanation. add screenshot or more details, to let others know what you exacly mean by e-ink screens and what term "friendly" epress here ? – Shailendra Singh Rajawat Mar 05 '13 at 11:00
  • 1
    @ShailendraRajawat Sorry for the misunderstanding. By 'e-ink screen', I mean a screen that works with the e-paper technology: http://en.wikipedia.org/wiki/Electronic_paper. I agree that 'friendly' is a bit abstract, but it's also not really important for the question. Whenever my app detects an e-paper display, I want to use different layouts (e.g. black/white instead of colors and gradients) and I want to avoid animations. – Flo Mar 05 '13 at 11:31
  • Name any Android devices that have e-ink screens. – CommonsWare Mar 05 '13 at 13:29
  • @CommonsWare e.g. Sony PRS-T1, Sony PRS-T2. Announced: txtr beagle, YotaPhone, possibly more to come. – Flo Mar 05 '13 at 15:25
  • Neither of those Sony devices support Android apps, except perhaps by rooting them. Hence, expecting Sony, or Google, to explicitly add developer support for detecting e-ink displays is unrealistic. You are presumably welcome to detect those devices via values in `Build` such as `MODEL`. Litkewise for the others you cite, if and when they ship. Someday, perhaps, formal developer support will be added for such displays. – CommonsWare Mar 05 '13 at 15:42
  • Thanks for your input. I am aware that you need to root most of the existing devices to get your apps on them. However, I never asked for explicit developer support or why there is none. I asked if somebody found a good way to detect those displays. The more generic the better. For this, the refresh rate seems like an interesting approach. – Flo Mar 05 '13 at 16:35
  • @Robert Your approach seems to work just fine. The Sony PRS-T2 has a refresh rate of 0.053 fps, while the Samsung Galaxy Tab 7 has a rate of 63.183 fps. I think, I'll check for a rate < 5 to detect e-ink: `public boolean isEInk() { return getWindowManager().getDefaultDisplay().getRefreshRate() < 5.0; }` Do you want to post sth. like this as an answer, so I can accept it? – Flo Mar 06 '13 at 10:33

1 Answers1

5

Current ePaper displays have a very slow refresh speed compared to LCD and OLED displays, therefore it should be possible to detect them using the value provided by Display.getRefreshRate().

boolean isEInk() { 
  return getWindowManager().getDefaultDisplay().getRefreshRate() < 5.0; 
}

However on some fairs video capable ePaper display prototypes has already been shown. Therefore I assume that the refresh rate may increase in the next time above the 5.0 value selected in the example code.

Robert
  • 39,162
  • 17
  • 99
  • 152
  • Unfortunately, some devices report high refresh rate (at least the Nook Simple Touch reports 68.0 fps). Sorry, but I must downvote. – Javier Sedano Apr 14 '13 at 16:28
  • Thanks for this information. Anyway my answer isn't wrong as I never stated that this is a 100% solution for detecting all e-paper devices. But it is still a valid indicator for a lot of e-paper equipped devices. That it does not work in your case is a different topic. – Robert Apr 15 '13 at 08:56
  • A good idea, but I get 16.0, 46.0, 68.0, 90.0 on four different Eink devices. I haven't ever seen anything lower. – Renate Jun 16 '22 at 13:30