Java tutorial
//package com.java2s; import android.app.Activity; public class Main { public static int getResolution(Activity act) { int Width = 0; int Height = 0; Width = act.getWindowManager().getDefaultDisplay().getWidth(); Height = act.getWindowManager().getDefaultDisplay().getHeight(); return Width * Height; } }