Share My Creation Garage Door Opener (with source code)

max123

Well-Known Member
Licensed User
Longtime User
The problem I had with FCM is in B4A side, I do not know if it is possible compile an application without add APY_KEY as static in compilation, so everyone can register and use it at runtime.

I've managed to register topics at runtime, but in the code the API_KEY is static, so if the app is personal no problem, but if it should distribuite, here is the problem.
This is not fully clear to me, even if I wrote an ESP FCM library that require me about 6 months to develop..... I will study your B4A code to see if it is different.

Ah, note that I wrote this same library for ESP in C++, for B4A and for B4J, started a port for B4R but I had problems, so paused it.

This allow to send 'speaking' (or not) FCM notifications from PC, Android, Raspberry etc. Note even that for B4J I wrote it as UI and NONUI libraries, the last do not have dependencies from JavaFX and works even in command line from terminal, just a line to send a notification to exactly a specified device.
 
Last edited:

josejad

Expert
Licensed User
Longtime User
I do not know if it is possible compile an application without add APY_KEY as static in compilation, so everyone can register and use it at runtime.
I'm not sure to understand. I think you're refering to the google-services.json you must save in the project folder.

The API_KEY is for an app (or group of apps), and you subscribe to a topic or several topics. Not every user needs his own API_KEY, just the app developer need it.

Please start a new thread if you have some problem or question about "Integrating Firebase Services" or "FirebaseNotificacions - Push"

Thanks¡
 

max123

Well-Known Member
Licensed User
Longtime User
Yes sorry, you are right, the problem is not API_KEY, I'm confused here.

The problem is the google-services.json that need to be downloaded and app should be compiled after that....

I'm in this situation, I want distribuite an Android app that remotely control 3D printers, actually it works over USB-OTG cable and here no need notifications....

When use it to connect remotely the app send a gcode file (3d printer file to work with) and SMTP account properties (that user set in the app), like smtp server, smtp server port etc.... to a server side connected to a 3D printer over USB.
The server side receive these infos and save it to send emails notification, eg. when the printing process start, when when are problems, when print finis... and so....

Using emails work well, but sometime the message will arrive with delay..... and email not is a good way to do this.

For this motivation I want substitute it with FCM notification, the problem is that I cannot recompile an app for any user with a different google-services.json.

My app that control remotely should receive notifications from Server side (Raspberry or ESP32) that register to a topic and so can send back a notification.
 

josejad

Expert
Licensed User
Longtime User
Please, as this is not related with my app, start a new thread with an apropiate subject to discuss it and get help from more people.
You don't need to recompile your app with differents google-services.json, you just use YOUR google-services.json. After that, every user can subscribe to a different topic to just get their own notifications.
Anyway, maybe you can do all that things just with MQTT, but please, open a new thread.
 

max123

Well-Known Member
Licensed User
Longtime User
Ok thanks I will do it.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…