Intercept start and close app

These two Blocks are in Conflict:

Screen Initialize has cleared the database tags, so Button_Controllo_control will always find nothing. Also, potentially Clock_Incrementa_increases could be 'double enabled'.

  1. Screen Initialize should not be over-loaded in this way - make those Blocks a Procedure and call the Procedure, if it is not enough to just use the Button (Button should also call the Procedure).

  2. Why clear the tags?

  3. If this App is for your Users, it would be best to have the database on your own server.

  1. When closing the App with a button, use a result Procedure to save the data to the db, otherwise the App could close before the data is saved. Make sure exiting with the Screen Back Button is covered too - call the same result Procedure.

  2. Data is not saved in labels - next time the App is launched, the label will be empty.

This you need to explain in depth Angelo - we have no idea what you mean - perhaps a schematic of how you want your App to work would help - as they say, a picture paints a thousand words.

Our small team of Power Users are very busy - there are already 21.1K users online today.

Of course I understand you, don't worry.
I ask for help, but I already know that you may not be able to offer it to me, for all the reasons you have listed.
Don't worry when you can and when you have time and he won't ask you for further commitment, you will answer me, otherwise it's okay.
Not for this will my esteem and recognition of everything you do for us all diminish.

I post an image that perhaps explains better than any other explanation, but which I add to make it clearer.

  1. I send a numeric data to the cloudb in this case every time I open the app I send a (1).
    Then, all the apps that will be started, will in turn send the number (1) to make it clear that they have been started.
  2. This set of numbers (1), each time they arrive, must increase in the label: 1-2-3-4-5- bringing everything back to the label (Openings), same thing for the closures

Question: How can I make the cloudb receive those nuneri and carry them back to the labels, increasing them by as many times as the data they received?

If I can do this, I will subtract from the (Openings), the closures and bring the final result back to the (Total Openings) label, finished.

Basically I just have to figure out how to make the cloudb count the openings and closings that arrive.

The repetition of the codes in the button is intentional, it serves to take the place of the increment which, however, does not work.
So I don't know how.

Where are they? In the hands of other Users? Do they have the exact same App as you or is your App the Master, the only one that collects the data (the others just being senders)?

I have actually explained why that does not work :upside_down_face:

Yes exactly

Yes exactly, the others are just senders

OK, so the User App just sends a '1' on Opening and another '1' on Closing.
The Master App Collects the database values for both Openings and Closings and displays them in Labels. I suggest that happens 'on demand' via a button. The other thing to consider is how the data will grow - just one User could open/close the App several times a week? The total will just grow and grow and grow........
Approximately how many Users?

For what it is worth, both Firebase and Redis offer an increment value, making it possible to add 1 to an existing integer on the server (without having to call it back)

Unfortunately, even though cloudDB is based on Redis, I do not believe it is possible to send the INCR command

Hmm - what about using Append Value to List - then the Master App can verify the List Length?

et's say 250,000 is desirable but it could be more.

Of course it will increase, if a user opens and closes repeatedly, but it will also increase the closures and therefore when I do the subtraction the result will always be less than the complete number of apps.
Naturally, the data when the master is closed at that moment must be stored in order to be able to view it when the master is reopened, which will then continue to add the openings from that data.
Which as DImaI2 writes, everything should be done on the server.
if there is no other solution, because only the server, will be able to continue the count even if the master is closed and therefore how to do it? With the servers I see it very bad I do not understand anything.
Unless the app is never closed.
But if it closes for some reason the data will no longer be real.

I think we need an understanding of what your App is actually intended for - why is this data being collected?

But for a simple reason, to demonstrate to third parties that they wanted proof of how many users are currently using the app a "simple" reason, but which would make the App much more interesting.

.... but counting openings and closures does not equate to the number of Users.

But what interests a potential customer is not how many have downloaded the App, but how many are actually using it at that moment

Wouldn't they need the Master App to find out?

I think that, for those who know how to monetize the app, it is above all a useful function.

But the master will serve to prove it to them every time they ask, and if they want the master for them, so be it, one more reason to be enticed to use your app.
The master will only serve that function and nothing else.

But if I were a company and you would like to sell me your app, the thing that would interest me most would be, how many customers will be able to see my message at a certain time and if I am good at statistics as a customer, will it carry out targeted advertising, in certain hours of the day, those that will have shown me more connections.

However, do not get lost behind this solution, because I understand that perhaps I have dared too much.
It will mean that I will not do without. Don't worry, it's not a problem.
Thank you for your interest and for the time you have dedicated to me.

You quite possible want: