there is a difference between being the default messaging app and an app that can receive
a broadcast when an sms is received. technically you can do both. the first is difficult, the
second is easy. do you understand the difference?
if all you want to do is to see when an sms is received (phone number and text),
you can do this. i do it on devices running android 12 and 14. when my devices receive an
sms, both the default sms app and my app receive the broadcast. the default sms app
does whatever it's supposed to do, and my app does what it's supposed to do. no problem,
no conflict. they are functioning independently. my app runs all the time and starts by itself
when the device is turned on.
you need to edit the manifest (add permissions and a receiver), and you need a receiver.
i don't know what you expect to do in the receiver, but it can't be something that takes too long.
you may need the receiver to communicate with a service to handle some long-running task in
that case. you need to define what it is you're trying to do and to familiarize yourself with how
b4a works with receivers and services these days. and you really need to know what android
requires for a given sdk. some of these issues are automatically handled in each successive
version of b4a, but you need to understand what they are and why certain things don't work.
you should research recent posts relating to receivers, not posts and examples from 10 years
ago. many things have changed with android since then.
start here:
https://www.b4x.com/android/forum/threads/receivers-and-services-in-2023.145370/#content
get that example running. it will be easy to modify it to handle sms.