Android용 Flutter 플러그인으로 앱이 들어오는 알림(게시 및 제거 포함)을 수신할 수 있도록 합니다. 앱에서 직접 알림에 응답할 수 있어 메시징 또는 자동화 도구에 적합합니다. 이 플러그인은 Android의 NotificationListenerService API를 활용하여 시스템 알림을 실시간으로 모니터링합니다. 개발자는 제목, 텍스트, 패키지 이름, 타임스탬프와 같은 알림 세부 정보에 접근할 수 있습니다. 사용자 권한을 통해 리스너 서비스를 활성화해야 하므로 개인정보 보호와 보안을 보장합니다. Android 전용으로 설계되어 기존 Flutter 프로젝트에 원활하게 통합됩니다.
사용 사례
실시간 알림 모니터링
자동 메시지 응답
알림 기반 워크플로
시스템 알림과 앱 통합
개인정보 인식 알림 추적
주요 기능
모든 수신 및 제거된 알림을 듣는다
직접 응답 기능을 지원합니다
Android 전용 플랫폼 호환성
권한 기반의 보안 접근
세부 알림 메타데이터 제공
적합한 대상
알림 자동화 도구를 개발하는 개발자
실시간 알림 인사이트가 필요한 앱
메시징 또는 채팅 애플리케이션
시스템 수준의 안드로이드 통합
개인정보 보호 중심의 알림 핸들러
고려 사항
Android 전용 설정 및 권한이 필요합니다
사용자는 수동으로 리스너 서비스를 활성화해야 합니다
Android 플랫폼에 한정
지속적인 청취 시 배터리 수명에 영향을 미칠 수 있습니다
민감한 데이터 접근은 주의 깊게 다뤄야 합니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
notification_listener_service
A flutter plugin for interacting with Notification Service in Android.
NotificationListenerService is a service that receives calls from the system when new notifications are posted or removed,
/// check if notification permession is enebaledfinalbool status = awaitNotificationListenerService.isPermissionGranted();
/// request notification permission/// it will open the notifications settings page and return `true` once the permission granted.finalbool status = awaitNotificationListenerService.requestPermission();
/// stream the incoming notification eventsNotificationListenerService.notificationsStream.listen((event) {
log("Current notification: $event");
});
The ServiceNotificationEvent provides:
/// the notification idint? id;
/// check if we can reply the Notificationbool? canReply;
/// if the notification has an extras imagebool? haveExtraPicture;
/// if the notification has been removedbool? hasRemoved;
/// notification extras image/// To display an image simply use the [Image.memory] widget.Uint8List? extrasPicture;
/// notification large icon/// To display an image simply use the [Image.memory] widget.Uint8List? largeIcon;
/// notification package nameString? packageName;
/// notification titleString? title;
/// the notification app icon/// To display an image simply use the [Image.memory] widget.Uint8List? appIcon;
/// the content of the notificationString? content;
/// send a direct message reply to the incoming notificationFuture<bool> sendReply(String message)
To reply to a notification provides:
try {
await event.sendReply("This is an auto response");
} catch (e) {
log(e.toString());
}