Product design wants to count how long the user is in the app, including when the user activates and shadows the app.
I now have the plan is when the app activates or when the home is built to hide, with different parameters to request the background interface, the background to do statistics.
But think about it, so the amount of data in this table will be very large. Difficult to maintain.
May I ask what is the best solution?
Reply content:
Product design wants to count how long the user is in the app, including when the user activates and shadows the app.
I now have the plan is when the app activates or when the home is built to hide, with different parameters to request the background interface, the background to do statistics.
But think about it, so the amount of data in this table will be very large. Difficult to maintain.
May I ask what is the best solution?
Simple statistics have third-party, such as friends of the league or something
1 Write access log analysis
2 One table per day
Client side Write a timer function, 30S or 60s to report the device situation
Why is the volume of data very large? If you want to count the total time, each accumulation is good, if you want to know how long each time open, that there is no lazy way, obediently set up a table, big deal scheduled backup, keep the table has a certain amount of data.