Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cell Id value not coming correctly on Android 13 #3

Open
Anshul-Raina opened this issue Nov 24, 2023 · 0 comments
Open

Cell Id value not coming correctly on Android 13 #3

Anshul-Raina opened this issue Nov 24, 2023 · 0 comments

Comments

@Anshul-Raina
Copy link

Anshul-Raina commented Nov 24, 2023

First of all, I am thankful to you for providing a package that contains all the required network signal information in dart. The package is self sufficient to get all the necessary details about a signal. I am facing an issue and I need your help to resolve it.

Here is the code snippet of how I am fetching the telephony information.

FutureBuilder<List<TelephonyInfo?>?>(
future: _flutterTelephonyInfoPlugin.getInfo(),
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const Center(
child: CircularProgressIndicator(), // Show a loading indicator
);
} else if (snapshot.hasError) {
return Center(
child: Text('Error: ${snapshot.error}'), // Show an error message
);
} else if (!snapshot.hasData || snapshot.data == null) {
return const Center(
child:
Text('No telephony information available'), // Handle no data
);
} else {
// Access the telephony information
List<TelephonyInfo?>? telephonyInfo = snapshot.data;
if (telephonyInfo!.isNotEmpty) {
Map<String, String> cellIdKeyValues =
parseCellId(telephonyInfo.first?.cellId);
Map<String, String> cellSignalStrengthKeyValues =
parseCellId(telephonyInfo.first?.cellSignalStrength);

However the value of cell id which i get from your package seems to be incorrect when I checked from other sources. All the other values are matching, but the cell id seems to be a combination of cell id and LAC, and needs to be parsed but is in the form of a string. I need your help in separating the cell id, so that I get the correct value of cell id.

From your package, the value of cell ID I am getting for 4g network is 46163979. But from G-NetTrack app, the value of cell ID is 180328.
image
image

Flutter 3.13.6
Dart 3.1.3
Android Version of my Mobile 13

@Anshul-Raina Anshul-Raina changed the title Cell Id value not coming correctly Cell Id value not coming correctly on Android 13 Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant