Getting device resolution on Android

I'm implementing an Android version of my game Blastonaut and i've run into an issue:

DeviceScreenWidth/Height are both zeros on Android.
If i set them manually, the program works fine.
The same code works flawlessly on Windows and iOS.

Heres the code:

al_get_monitor_info(0 , &mInfo);
int DeviceScreenWidth = mInfo.x2 - mInfo.x1;
int DeviceScreenHeight = mInfo.y2 - mInfo.y1;

// Portrait mode
gameDisplay = al_create_display(DeviceScreenHeight, DeviceScreenWidth);

P.S. I'm testing on a Galaxy S4.

Thread #614255. Printed from