0
Good afternoon ! Perhaps my question does not fit the criteria perfectly because it is another question whether "it is possible or not possible". Here is the problem: I want to create an app in the following scenario: it will mark how long the mobile screen is turned off after a certain time even if the app in question is not active. Follow scenario for better understanding: The app is installed on mobile, but is in the Destroy state, within the app I set for it to count from 10 hrs of the night only... so even with the app "not active" I want every day, after the 22hrs he tells how long the screen of the mobile phone is not turned on (how long the person was left without touching the mobile phone) where I would capture this time and store for statistical purposes, in short it would be like a task of the app that runs autonmamente, almost like the Android OS, all this because I want to create an app that tries to guess how much time the user has slept, so the question of the initial time, where it configures "normally I sleep for this time"then if the screen is off for more than 2hrs after this time the app will understand that the user is sleeping.
Please answer me if this is possible so that I end up not injecting time into a project that cannot be completed by being too crazy rsrs. Thanks to the community!