Feature usage
An action block that gets usage statistics for a system feature, e.g. screen on/off, locked/unlocked.
The fiber will proceed immediately without pause.
This block gets the feature usage statistics as recorded and stored by the system.
Usage statistics are aggregated into day, week, month and year intervals,
the minimum timestamp and maximum timestamp
determines which interval period to output.
The system only keep a few past intervals, so don’t expect to access 12 daily statistics from 4 years ago.
Note! This feature requires Android 9+.
Input arguments
- Minimum timestamp — unix timestamp of the earliest usage statistics to get, default is first recorded usage.
- Maximum timestamp — unix timestamp of the latest usage statistics to get, default is current time.
- Interval — interval to output aggregated usage statistics for, default is Best fit.
- Statistic — type of usage statistic to output, default is Screen interactive.
Output variables
- Usage count — variable to assign the number of times the statistic triggered.
- Usage duration — variable to assign the total duration of the statistic state, in seconds.
- Last used — variable to assign the last time in the statistic was triggered, as a unix timestamp,
may be outside of the specified time window due to an Android bug.
- Stats start — variable to assign the first reported statistic, as unix timestamp,
may be outside of the specified time window if it’s not exactly fitting an aggregation interval.
- Stats end — variable to assign the last reported statistic, as unix timestamp,
may be outside of the specified time window if it’s not exactly fitting an aggregation interval.