monitoringAppUsage method

Future<MonitoringAppUsage> monitoringAppUsage({
  1. int startHour = 0,
  2. int startMinute = 0,
  3. int endHour = 23,
  4. int endMinute = 59,
  5. UsageInterval usageInterval = UsageInterval.daily,
  6. int lookbackTimeMs = 10000,
  7. List<String>? packagesName,
})

Start monitoring app usage with the specified schedule.

Parameters:

  • startHour: The hour to start monitoring (0-23).
  • startMinute: The minute to start monitoring (0-59).
  • endHour: The hour to end monitoring (0-23).
  • endMinute: The minute to end monitoring (0-59).

Returns a map with the following keys:

  • status: Whether monitoring was successfully started.
  • monitoringActive: Whether monitoring is currently active.
  • schedule: Map containing schedule details (startTime, endTime, frequency).
  • timestamp: When monitoring was started.
  • error: Error message if monitoring failed to start.

Implementation

Future<MonitoringAppUsage> monitoringAppUsage({
  int startHour = 0,
  int startMinute = 0,
  int endHour = 23,
  int endMinute = 59,
  UsageInterval usageInterval = UsageInterval.daily,
  int lookbackTimeMs = 10000,
  List<String>? packagesName,
}) {
  throw UnimplementedError('monitoringAppUsage() has not been implemented.');
}