Getting screen resolution lazarus / 43-Android ---------------------------------------------------------------------- mbdev · 2014-04-14 15:22 Hello, I'm trying to get the screen resolution on an android device. I tried the following code from the Android Programming wiki-page but I'm getting the error: Stream read error. I hope that somebody can help me Code: [Select]  DispalyMet:=TDisplayMetrics.Create();   Activity.getWindowManager().getDefaultDisplay().getMetrics(DispalyMe t);   fDisplayWidth:=DispalyMet.widthPixels();   fDisplayHeight:=DispalyMet.heightPixels(); ---------------------------------------------------------------------- Rails · 2014-04-14 15:32 Lazarus has the built in global variable screen that holds screen info. Not sure if it works with Android, but give it a try. Code: [Select] screen.width screen.height