Usually failure to detect with the screen off has to do with limitations on your Android phone model and operating system. This is a super common problem during troubleshooting, so best suited to help on StackOverflow.com. Please first read this document about expected detection times, then if you still don't think it is working right, open a question on StackOverflow.com including details about your phone model, beacon type (iBeacon, AltBeacon, etc.), which scan strategy you have configured, whether you are using ranging or monitoring APIs, and how long you waited for a detection.
Usually failure to detect with the screen off has to do with limitations on your Android phone model and operating system. This is a super common problem during troubleshooting, so best suited to help on StackOverflow.com. Please first read this document about expected detection times, then if you still don't think it is working right, open a question on StackOverflow.com including details about your phone model, beacon type (iBeacon, AltBeacon, etc.), which scan strategy you have configured, whether you are using ranging or monitoring APIs, and how long you waited for a detection.
https://altbeacon.github.io/android-beacon-library/detection_times.html