I have a Question regarding my app’s user count according to my database.
The number of users in my app is not as shown in the Play Console.
My Play console shows that 500 new users Downloaded my app.
Whereas in my Database, only 50 users were visible who downloaded and opened my app (which is counted in total temp users).
a few days ago, if the play console showed 500 new users, 500 new users were also shown in my app’s database which records who downloaded and opened my app.
I have also recently updated my app with the new version.
When I downloaded and opened my app, it WAS RECORDED in my app’s database.
I did it multiple times and it worked flawlessly.
Could someone also please try the thing and say if there is any issue?
Blocks
I’m not sure but what happening if a lot of user acces your app simultaneously . Probably some users get the wrong total number (not updated ) and with hundreds of users your count is wrong.
I think the way total +1 is always under danger .
Yog have a list of user where you store data ? You can get the length of the list to know the real dimension of the database.
With a clock and saving date with value you can code to get this value only every month or only every week so you can save the new users for week to week or month to month
Oh nice , I remembered not works with row number.
Anyway if the problem is about multi reading value , to be sure to read the right value you have to create a procedure with two value . A true/false value to work , if value is true you can get value and count the user, in the while set value to false .
And another condition to start , if lenght of column is 50 set variable to false and manage the data.
Every users download the app at first have to add +1 in the column, if column lenght= 50 , set variable to false, get the total value and add 50 , then set variable to true again
I think if 2 or more people get value contemporarily only one of them will get the right value .
Get and store value take some time , so if user 1 and user 2 get value together they will have both 7738 and they will store both 7739 , so you losted one user .
May be some power user can confirm this iusse .
I have NOT LOST SINGLE USERS due to the thing when 2 or more people hit the Button at the same time and the Updated count is only 1. Also, could you please Reply about this?
If the problem is about users that get value contemporarily I think you have to create a procedure that when the list of new users reaches a fix number (50 or 100) you have to add 50 or 100 to the total amount, in the while no user can access to the procedure to update total