Android Question Send a request without notifications

pazzokli

Active Member
Licensed User
Longtime User
Hi everyone, I need some advice on what might be the best way to do this:
I have an Android tablet at home running an app that collects feedback from some sensors in the house and then uploads files containing information about the sensors to my private FTP space. With my and my wife's smartphones, we can read these files and know the status of the sensors in the house.
Additionally, there are specific requests that the smartphones can make to the tablet by sending push notifications, such as opening the driveway gate or telling me the status of the awning.
The problem is with the notifications. With the new Firebase authentication protocol, I can't use them between two Android apps.
How can I replace them? For example, by checking a request file, but how often? I tried checking the files on FTP every 3 seconds, but the battery dies halfway through the day.
What is the best strategy to send a specific request to another Android app without notifications?
 

DonManfred

Expert
Licensed User
Longtime User
The problem is with the notifications. With the new Firebase authentication protocol, I can't use them between two Android apps.
Why not? Each device has an unique token.
Each device can subscribe to topics. Even multiple.

Create a B4J Server for sending the Notifications.
 
Upvote 0

Brian Dean

Well-Known Member
Licensed User
Longtime User
Have you looked at MQTT? It seems designed exactly for the sort of requirement that you have, is very simple to implement, does not require a server and should be free for the application that you have in mind.
 
Upvote 1

aeric

Expert
Licensed User
Longtime User
You can either run a local broker (for local network solutions) or an online broker.
 
Upvote 0

aminoacid

Active Member
Licensed User
Longtime User
Hi everyone, I need some advice on what might be the best way to do this:
I have an Android tablet at home running an app that collects feedback from some sensors in the house and then uploads files containing information about the sensors to my private FTP space. With my and my wife's smartphones, we can read these files and know the status of the sensors in the house.
Additionally, there are specific requests that the smartphones can make to the tablet by sending push notifications, such as opening the driveway gate or telling me the status of the awning.
The problem is with the notifications. With the new Firebase authentication protocol, I can't use them between two Android apps.
How can I replace them? For example, by checking a request file, but how often? I tried checking the files on FTP every 3 seconds, but the battery dies halfway through the day.
What is the best strategy to send a specific request to another Android app without notifications?

MQTT seems to be perfect for your application. As mentioned by a few of the forum members above, there are several free servers available. Check out Adafruit IO -

 
Upvote 0

pazzokli

Active Member
Licensed User
Longtime User
I must say tankyou to all guys. Many advise that I have to study. I did It on my free time only
 
Upvote 0

pazzokli

Active Member
Licensed User
Longtime User
Update: I'm using with good results MQTT protocol and Hive broker.
Only problemi: I Lost trigger events when client (my smartphones) are not running app and so disconnected from broker.
Next step....
Thanks
 
Upvote 0
Top