Are they rpi and mobile on same network? ( local wifi)? If yes, you can use UDP to share info between them; a service to listen to udp on B4A to open a notification window
If not, the rpi can act as a http server (with public IP) and B4A can establish a socket to Rpi or query for an http page to read a state, and raise a notification, or rpi send a e-mail to a mail account that B4A is querying every x seconds, etc..or
Do you need instant notification on B4?