code: static DisplayMetrics getScreenDisplay(Context context) {
          DisplayMetrics displayMetrics = new DisplayMetrics();
          if (context != null) {
              WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
              if (windowManager != null) {
                  Display display = windowManager.getDefaultDisplay();
                  display.getMetrics(displayMetrics);
              }
          }
          return displayMetrics;
      }
docs: <p>This method returns a {@link DisplayMetrics} object that contains the attributes of the
  default display of the device that the SDK is running on. Use this when you need to know the
  dimensions of the screen, density of pixels on the display or any other information that
  relates to the device screen.</p>
  <p>Especially useful when operating without an Activity context, e.g. from a background
  service.</p>
  
  @param context Context.
  @return <p>A {@link DisplayMetrics} object representing the default display of the device.</p>
  @see DisplayMetrics