I'm glad you could answer this question, but my device is very old. It's an old Android SDK 10 phone.
I have found that some app can display information on the screen,when the screen is locked, even on SDK 10 mobile phones.
Anyway, I made a lockscreen myself to bypass this problem.
Maybe it's waste time to find the method.
Ha ha, it would be better if we could know how the other app do this.