added variables to manage if tablet or mobile and also to get dpi