{"id":13550822,"url":"https://github.com/Zfinix/carrier_info","last_synced_at":"2025-04-03T00:35:07.305Z","repository":{"id":41956335,"uuid":"319901263","full_name":"Zfinix/carrier_info","owner":"Zfinix","description":"📱 Carrier Info gets networkType, networkGeneration, mobileCountryCode, mobileCountryCode, e.t.c from both android and iOS devices. ","archived":false,"fork":false,"pushed_at":"2024-09-05T11:07:16.000Z","size":969,"stargazers_count":34,"open_issues_count":17,"forks_count":48,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-11-03T20:36:07.503Z","etag":null,"topics":["android","flutter","ios"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zfinix.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-09T09:10:07.000Z","updated_at":"2024-09-05T11:07:21.000Z","dependencies_parsed_at":"2024-08-01T12:18:33.805Z","dependency_job_id":"e6878239-1656-4b14-921d-b8982d3badae","html_url":"https://github.com/Zfinix/carrier_info","commit_stats":{"total_commits":28,"total_committers":12,"mean_commits":"2.3333333333333335","dds":0.75,"last_synced_commit":"e310ba2809a9ca6e678864c8f79594a0469efe22"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zfinix%2Fcarrier_info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zfinix%2Fcarrier_info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zfinix%2Fcarrier_info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zfinix%2Fcarrier_info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zfinix","download_url":"https://codeload.github.com/Zfinix/carrier_info/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246916735,"owners_count":20854511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","flutter","ios"],"created_at":"2024-08-01T12:01:38.080Z","updated_at":"2025-04-03T00:35:02.250Z","avatar_url":"https://github.com/Zfinix.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"# 📱 Carrier Info\n\n[![pub package](https://img.shields.io/pub/v/carrier_info.svg?label=carrier_info\u0026color=blue)](https://pub.dev/packages/carrier_info)\n\nCarrier Info gets networkType, networkGeneration, mobileCountryCode, mobileCountryCode, e.t.c from both android and ios devices. It's a port from this [js project](https://github.com/react-native-webrtc/react-native-carrier-info) and an improvement on the existing [flt_telephony_info package](https://pub.dev/packages/flt_telephony_info).\n\n## 📸 Screen Shots\n\n\u003cp float=\"left\"\u003e\n\u003cimg src=\"https://github.com/Zfinix/carrier_info/blob/main/1.png?raw=true\" width=\"200\"\u003e\n\u003cimg src=\"https://github.com/Zfinix/carrier_info/blob/main/1.jpeg?raw=true\" width=\"200\"\u003e\n\u003c/p\u003e\n\n### Fetching android carrier info\n\nDocs: https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkCountryIso(), https://developer.android.com/reference/android/telephony/SubscriptionManager\n\n```dart\n AndroidCarrierData? carrierInfo = await CarrierInfo.getAndroidInfo();\n returns  {\n   \"isVoiceCapable\": true,\n   \"isDataEnabled\": true,\n   \"subscriptionsInfo\": [\n     {\n       \"mobileCountryCode\": \"310\",\n       \"isOpportunistic\": false,\n       \"mobileNetworkCode\": \"260\",\n       \"displayName\": \"T-Mobile\",\n       \"isNetworkRoaming\": false,\n       \"simSlotIndex\": 0,\n       \"phoneNumber\": \"+15551234567\",\n       \"countryIso\": \"us\",\n       \"subscriptionType\": 0,\n       \"cardId\": 0,\n       \"isEmbedded\": false,\n       \"carrierId\": 1,\n       \"subscriptionId\": 1,\n       \"simSerialNo\": \"\",\n       \"dataRoaming\": 0\n     }\n   ],\n   \"isDataCapable\": true,\n   \"isMultiSimSupported\": \"MULTISIM_NOT_SUPPORTED_BY_HARDWARE\",\n   \"isSmsCapable\": true,\n   \"telephonyInfo\": [\n     {\n       \"networkCountryIso\": \"us\",\n       \"mobileCountryCode\": \"310\",\n       \"mobileNetworkCode\": \"260\",\n       \"displayName\": \"T-Mobile\",\n       \"simState\": \"SIM_STATE_READY\",\n       \"isoCountryCode\": \"us\",\n       \"cellId\": {\n         \"cid\": 47108,\n         \"lac\": 8514\n       },\n       \"phoneNumber\": \"+15551234567\",\n       \"carrierName\": \"T-Mobile\",\n       \"subscriptionId\": 1,\n       \"networkGeneration\": \"4G\",\n       \"radioType\": \"LTE\",\n       \"networkOperatorName\": \"T-Mobile\"\n     }\n   ]\n };\n  \n\n IosCarrierData? carrierInfo = await CarrierInfo.getIosInfo();\n\n returns  {\n   \"carrierData\": [\n     {\n       \"mobileNetworkCode\": null,\n       \"carrierAllowsVOIP\": true,\n       \"mobileCountryCode\": null,\n       \"carrierName\": \"glo\",\n       \"isoCountryCode\": null\n     },\n     {\n        \"mobileNetworkCode\": \"20\",\n        \"isoCountryCode\": \"ng\",\n        \"carrierAllowsVOIP\": true,\n        \"carrierName\": \"Airtel\",\n        \"mobileCountryCode\": \"621\"\n      }\n    ],\n    \"supportsEmbeddedSIM\": false,\n    \"carrierRadioAccessTechnologyTypeList\": [\n      \"LTE\"\n    ]\n  }\n };\n```\n\n### Permissions\nYou should add permissions that are required to your android manifest:\n\n```xml\n  \u003cuses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" /\u003e\n  \u003cuses-permission android:name=\"android.permission.READ_BASIC_PHONE_STATE\" /\u003e\n  \u003cuses-permission android:name=\"android.permission.READ_PHONE_STATE\" /\u003e\n  \u003cuses-permission android:name=\"android.permission.READ_PHONE_NUMBERS\" /\u003e\n  \u003cuses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" /\u003e\n  \u003cuses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" /\u003e\n  \u003cuses-permission android:name=\"android.permission.READ_PRIVILEGED_PHONE_STATE\" /\u003e\n```\n\n## ✨ Contribution\n\nLots of PR's would be needed to make this plugin standard, as for iOS there's a permanent limitation for getting the exact data usage, there's only one way around it and it's super complex.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZfinix%2Fcarrier_info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZfinix%2Fcarrier_info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZfinix%2Fcarrier_info/lists"}