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

插件详情v0.0.7

flutter_cell_info

一个轻量级库,基于 Telephony SDK 构建。NetMonster 核心源自 NetMonster 应用程序,并将多个 Telephony 功能回溯到较旧的 Android 设备上。

AndroidiOS
近 30 天下载
162
喜欢数
4
Pub 分数
160

安装插件

flutter pub add flutter_cell_info

插件介绍

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

一个轻量级的 Flutter 包,利用 Telephony SDK 在 Android 和 iOS 设备上提供蜂窝网络信息。基于 NetMonster 的核心构建,它提取关键的电话功能并回传到较旧的 Android 版本,使开发者能够访问详细的基站数据,例如信号强度、运营商信息和网络类型。该包非常适合需要底层网络诊断或连接监控的应用。

适合场景

  • 网络诊断
  • 信号强度监控
  • 载体信息检索
  • 移动应用分析
  • 设备连接跟踪

主要特点

  • 访问蜂窝网络详情
  • 对较旧 Android 设备的支持
  • 跨平台(Android & iOS)
  • 轻量且高效
  • 回溯的电话功能

适合对象

  • 开发网络监控工具的开发者
  • 需要实时蜂窝信息的应用程序
  • 分析平台跟踪设备连接
  • 旧版 Android 支持项目

使用建议

  • Android 上需要适当的权限
  • 仅限电话数据
  • iOS 可能会限制对某些详细信息的访问
  • 依赖于底层平台功能

原始 README

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

flutter_cell_info

Cell Info Plugin

NetMonster Core

🚧 Work in progress! 🚧

Lightweight Android library that is build over Telephony SDK. NetMonster core is extracted from NetMonster application and backports several Telephony features to older Android devices.

Why use NetMonster Core instead of legacy API?

  • Validation - library validates data from RIL and corrects them if possible
  • Richer information - additional functions for cell identity and cell signal that will make your code more understandable
  • Backport - several non-accessible signal or identity fields are now accessible without boilerplate code
  • Tested - tested on real devices, 50 000+ active users
New functions

Here's small comparison for each of voice / data network you can meet.

GSM
function Min SDK Android Min SDK NetMonster Core
CGI - I (14)
NCC - N (24)
BCC - N (24)
Band - N (24)
TA O (26) N (24)
WCDMA
function Min SDK Android Min SDK NetMonster Core
CGI - I (14)
CID (16b) - I (14)
RNC - I (14)
Ec/Io - M (23)
Band - N (24)
BER - Q (29)
Ec/No - Q (29)
RSCP - Q (29)
LTE
function Min SDK Android Min SDK NetMonster Core
eCGI - I (14)
CID (8b) - I (14)
eNb - I (14)
RSSI Q (29) I (14)
RSRP O (26) I (14)
CQI O (26) I (14)
SNR O (26) I (14)
TA O (26) I (14)
Band - N (24)
Usage

There are basically two ways you can use this library - as a validation library that will sanitize data from AOSP cause lots of manufacturers modify source code and do not follow public documentation. In that case you'll only need ITelephonyManagerCompat to retrieve AOSP-like models that are properly validated.

The second option is to use advantages of additional postprocessing of NetMonster Core. As a result you'll get more data but correctness is not 100 % guaranteed.

Without additional postprocessing

NetMonster Core focuses on mapping of two AOSP's ways to fetch current cell information:

Note that some of those methods are deprecated or even removed from AOSP - for more info see documentation of each method.

Postprocessing

In this case you'll need to interact with INetMonster class. Here's list of problems that this library solves.

Merging data from multiple sources

Issue:

  • Android offers multiple ways how to get cell information.
  • Not all devices support one unified way how to access all the data.

Solution:

  • NetMonster Core grabs data from sources you specify, validates and merges them.
Detection of LTE-A & HSPA+42

Issue:

  • AOSP cannot detect HSPA+42, only HSPA+.
  • AOSP does not offer a way to distinguish whether current network is using carrier aggregation or not.

Solution:

  • NetMonster Core attempts to guess HSPA+ 42 availability.
  • LTE-CA presence can be guessed based on cell info or detected using hidden APIs.

Using getNetworkType(vararg detectors: INetworkDetector) you can specify which INetworkDetector to use when detecting current network type.

Other features
  • Detection of serving cells in 'emergency calls only' mode.
  • PLMN addition to non-serving cells in GSM, WCDMA, LTE, TD-SCDMA and NR networks.

Platform support

Feature Android iOS
Carrier / SIM info (name, MCC, MNC) ✅ ✅¹
Current radio technology (LTE/NR/…) ✅ ✅
Cell identity (CID, TAC, PCI, eNb …) ✅ ❌²
Signal strength (dBm, RSRP, RSRQ …) ✅ ❌²
Neighbouring cells ✅ ❌²

¹ Apple deprecated CTCarrier in iOS 16; on iOS 16+ it returns placeholder values (--, 65535).

² iOS exposes no public API for cell-tower identity, signal strength or neighbouring cells. On iOS, getCellInfo therefore returns the current radio access technology per SIM in primaryCellList with identity/signal fields left null, and neighboringCellList is always empty.

The Dart API (CellInfo.getCellInfo, CellInfo.getSIMInfo, CellInfo.sharedPreference) and JSON response shape are identical across both platforms.

Originally forked from cell_info

Credit to - eslamfaisal

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。