app_ops_watcher 0.0.2 copy "app_ops_watcher: ^0.0.2" to clipboard
app_ops_watcher: ^0.0.2 copied to clipboard

discontinuedreplaced by: user_permission
PlatformAndroid

Flutter plugin for watching App Ops Manager. Not supported on iOS.

app_ops_watcher #

This plugin provides Android applications with the ability to obtain the status of special app access and detect changes. Specifically, it has the following functions:

  1. Get status of special app access:

    This plugin checks whether the app has been granted special app access permission.

  2. Launch screen for status change:

    It has the ability to launch the settings screen required for granting special app access. Through this plugin, users can access the settings screen to easily grant the necessary permissions to the app.

  3. Detect status change:

    It can detect changes in the status of special app access in real time. This allows you to automatically return to your app from the settings screen.

Platform Support #

Android

Usage #

To use this plugin, add app_ops_watcher as a dependency in your pubspec.yaml file.

Get status #

import 'package:app_ops_watcher/app_ops_type.dart';
import 'package:app_ops_watcher/app_ops_watcher.dart';

final state = await AppOpsWatcher().checkOp(AppOpsType.usageStats);

Launch screen & Detect status change #

import 'package:app_ops_watcher/app_ops_type.dart';
import 'package:app_ops_watcher/app_ops_watcher.dart';

final state = await AppOpsWatcher().startWatching(AppOpsType.systemAlertWindow);

Status value #

The status is returned as an int.

Android parameters value
MODE_ALLOWED 0
MODE_IGNORED 1
MODE_ERRORED 2
MODE_DEFAULT 3
MODE_FOREGROUND 4

Learn more #

1
likes
150
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter plugin for watching App Ops Manager. Not supported on iOS.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on app_ops_watcher

Packages that implement app_ops_watcher