You can set it up as follows:
1. Long press the app icon on the desktop > app info > Battery usage > turn on Allow foregound activity and allow auto launch;
2. Settings > Notifications & Status Bar > Manage notifications > Lock screen notifications > Select to Dispaly title and body or Display title only and Do not show body.
3. Press and hold the app icon on the desktop > App Info > Manage notifications > Turn on Allow notifications and enable lock screen notifications;
4. Ensure that there is remaining memory in the background, you can lock the app in the background;
5. Turn off the power saving mode or Ultra standby mode of optimized standby (realme UI 1.0: Sleep standby optimization). This mode will limit the app and power consumption and affect the notifications.