搜索插件、代码仓与 APP 分类

插件详情v0.0.3

flutter_mdns_plugin

Flutter mDNS 插件

AndroidiOS
近 30 天下载
58
喜欢数
10
Pub 分数
120

安装插件

flutter pub add flutter_mdns_plugin

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个 Flutter 插件,可为发现本地网络设备和服务启用 mDNS(多播 DNS)功能。它允许应用程序使用标准的 mDNS 协议在本地网络上广播和解析服务记录,从而在家庭自动化或物联网应用等环境中实现无缝设备通信。该插件支持 Android 和 iOS 平台,提供一致的服务发现和解析接口。非常适合需要在无需手动配置的情况下定位同一网络中的打印机、智能设备或其他服务的应用。

适合场景

  • 发现本地网络设备
  • 自动化物联网设备配对
  • 启用零配置网络
  • 支持打印机发现
  • 促进本地服务通信

主要特点

  • 跨平台 mDNS 支持
  • 服务浏览和解析
  • 服务的广播和广告
  • 简单的集成API
  • 实时服务更新

适合对象

  • 物联网应用开发者
  • 本地网络服务发现程序
  • 智能家居应用
  • 打印机连接工具
  • 需要零配置网络的应用程序

使用建议

  • 需要本地网络访问
  • 可能需要 Android/iOS 权限
  • 仅限本地子网发现
  • 性能取决于网络稳定性
  • 不支持非本地 mDNS 查询

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

flutter_mdns_plugin

A simple plugin for discovering mdns services in Flutter on Android and iOS. The example project is set to discover Chromecasts only, but you can set any mdns service by changing the discovery_service string in device_scanner.dart.

iOS installation Make sure you add the Foundation framework to your iOS project in xcode.

Android installation No installation required. Just make sure the permission android.permission.INTERNET is added in your AndroidManifest.xml, but that should be automatically set when creating a new Flutter project.

Most of the code for Android came from this repository: https://github.com/platinumjam/flutter_mdns

Most of the code for iOS came from this resource: https://www.eventbrite.com/engineering/bonjour-gatekeeper-how-to-implement-bonjour-service-in-an-ios-or-android-app/

所属分类

源码仓库

使用此插件的项目