How to get screen display metrics in application class

Here, Context.getResource()

DisplayMetrics dm = getResources().getDisplayMetrics(); 
int densityDpi = dm.densityDpi;

Leave a Comment