Nguyen  Minh Binh
Nguyen Minh Binh

Reputation: 24423

is there any way to get display refresh rate programmatically?

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

Upvotes: 19

Views: 11225

Answers (1)

Nguyen  Minh Binh
Nguyen Minh Binh

Reputation: 24423

The solution is:

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

Thanks to THelper.

Upvotes: 35

Related Questions