I started a new app last week, which should be based on push notification (using Firebase).
It is in the first stage now. the App should be some kind of "In Company whatsapp", showing messages from the company directories to workers.
I just saw the B4X Pages toturial, and i wonder if this kind of app should build with B4X Pages? since the weight is on push notification parsing, does the B4X Pages gives any advantages?
The real question is whether you want to support multiple orientations or not. If not then use B4XPages. It will not make anything more complicated and it will make some things simpler.
I tried to move the app to B4XPages, and i get few errors-
1) the firebase service is not initialized. i thought it is becuse "starter" is not called in b4XPages. but it is called. i put the service "firebase messing" in the root folder. should i put it in another place?
2) i use method setinfo2 to react to the notification arrivel and click. it allowed me to pass data to the activity. how should i open the B4xPages Mainpage from the service? can it be done? can i pass info to it? it not, should i open the activity and then, from there, to open the mainpage?
3) can't i use #BridgeLogger: true from the mainpage?
2) All the pages are inside the main activity. You should set the activity parameter to Main. You can get the notification tag in Activity_Resume in Main, and do whatever you need with it. Remember that the B4XPages are regular classes.
Well, i couldn't find any different between your code and my own.
but i keep get error-
java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process b4a.example. Make sure to call FirebaseApp.initializeApp(Context) first.
do you have any idea?