Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there any way to get display refresh rate programmatically?

Tags:

android

As the title, i want to get the refresh rate of android phone then show to user. Is there any way?

Updated: what is refresh rate? http://en.m.wikipedia.org/wiki/Refresh_rate

like image 763
Nguyen Minh Binh Avatar asked Apr 30 '12 07:04

Nguyen Minh Binh


People also ask

How do I find my refresh rate?

The refresh rate can be calculated from the horizontal scan rate by dividing the scanning frequency by the number of horizontal lines, plus some amount of time to allow for the beam to return to the top. By convention, this is a 1.05x multiplier.


1 Answers

The solution is:

Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
float refreshRating = display.getRefreshRate();

Thanks to THelper.

like image 157
Nguyen Minh Binh Avatar answered Sep 28 '22 06:09

Nguyen Minh Binh