I had to create an Android application which will work on screen time of different applications. I can't find any way to get the screen time data. There is an app digital wellbeing for Android application but I can't find its api. So is there any way to track screen time or export the data of digital wellbeing application. Either of them will be helpful for me.
I had tried to search for different options. I came across with Google fit api but it gives me step count only whereas I need to work with screen time data.
UsageStatsManager
Provides access to device usage history and statistics. Usage data is aggregated into time intervals: days, weeks, months, and years.
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwiVnbqPrZWEAxVhLbkGHfQuCIoQFnoECA8QAQ&url=https%3A%2F%2Fdeveloper.android.com%2Freference%2Fandroid%2Fapp%2Fusage%2FUsageStatsManager&usg=AOvVaw1w3SpPCH0PLES1KqmXftzi&opi=89978449