If you have specific information for the model and screen size (as you mention is Galaxy S3 mini (4" size)) then get the information of the device from the System to check and apply your code:
Build.MODEL, Build.PRODUCT, Build.MANUFACTURER
And the screen size:
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int width = size.x;
int height = size.y;
Hope these help.