- 🔭 I’m currently working on Chinahrt
- 🌱 I’m currently learning dart、Flutter、Golang
- 📫 How to reach me: [email protected]
randywei / flt_telephony_info Goto Github PK
View Code? Open in Web Editor NEW获取SIM卡信息
License: MIT License
获取SIM卡信息
License: MIT License
When cloning the current master branch and opening the example app project for IOS in XCode:
Showing Recent Messages
:-1: Multiple commands produce '/Users/geoheil/development/phd/forked-oss-projects/flt_telephony_info/example/build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework':
1) Target 'Runner' has copy command from '/Users/geoheil/development/phd/forked-oss-projects/flt_telephony_info/example/ios/Flutter/Flutter.framework' to '/Users/geoheil/development/phd/forked-oss-projects/flt_telephony_info/example/build/ios/Debug-iphoneos/Runner.app/Frameworks/Flutter.framework'
2) That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”
the project does not build. I am not sure where this problem originates from
How do I get network type for example GPRS, EDGE, 3G, 4G?
The print statement spams the flutter log output. We should either put it behind a flag or remove it completely.
Performing hot restart...
Syncing files to device iPhone 12 Pro Max...
Restarted application in 919ms.
flutter: {
callState:null,
dataNetworkType:null,
deviceSoftwareVersion:null,
imei:null,
isDataEnabled:null,
isSmsCapable:null,
isVoiceCapable:false,
line1Number:null,
meid:null,
nai:null,
networkCountryIso:null,
networkOperator:,
networkSpecifier:null,
networkType:null,
networkOperatorName:null,
phoneCount:null,
phoneType:null,
serviceState:null,
simCarrierId:null,
simCarrierIdName:null,
simCountryIso:null,
simOperator:,
simOperatorName:null,
simSerialNumber:null
}
E/MethodChannel#bughub.dev/flt_telephony_info(26540): Failed to handle method call
E/MethodChannel#bughub.dev/flt_telephony_info(26540): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference
E/MethodChannel#bughub.dev/flt_telephony_info(26540): at dev.bughub.flt_telephony_info.FltTelephonyInfoPlugin.onMethodCall(FltTelephonyInfoPlugin.kt:34)
E/MethodChannel#bughub.dev/flt_telephony_info(26540): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
E/MethodChannel#bughub.dev/flt_telephony_info(26540): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
E/MethodChannel#bughub.dev/flt_telephony_info(26540): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:643)
E/MethodChannel#bughub.dev/flt_telephony_info(26540): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#bughub.dev/flt_telephony_info(26540): at android.os.MessageQueue.next(MessageQueue.java:325)
E/MethodChannel#bughub.dev/flt_telephony_info(26540): at android.os.Looper.loop(Looper.java:142)
E/MethodChannel#bughub.dev/flt_telephony_info(26540): at android.app.ActivityThread.main(ActivityThread.java:6494)
E/MethodChannel#bughub.dev/flt_telephony_info(26540): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#bughub.dev/flt_telephony_info(26540): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
E/MethodChannel#bughub.dev/flt_telephony_info(26540): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Can you also document the required entitlements for IOS?
I am have developed my app using this library and now I am getting this error from flutter pub get
:
The plugins `flt_telephony_info, flutter_telephony` use a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if these plugins support the Android V2 embedding. Otherwise, consider removing them since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.
I want to contribute to this library . Please let me know if you are open to pull requests. If yes then I would like to make this repo Android V2 embedding
supported. Please let me know.
I tried running the example project, but it didn't work.
Null-safety is not supported, it's impossible to use the library with Flutter2.
../../../.pub-cache/git/flt_telephony_info-d42a273c1f538953117bc930a73933643a05ca32/lib/flt_telephony_info.dart:13:31: Error: The argument type 'Map<String, dynamic>?' can't be assigned to the parameter type 'Map<String, dynamic>' because 'Map<String, dynamic>?' is nullable and 'Map<String, dynamic>' isn't.
- 'Map' is from 'dart:core'.
TelephonyInfo.fromMap(await _channel.invokeMapMethod<String, dynamic>('getTelephonyInfo'));
Do you have plans to support Null-safety?
Integrating gives below error since the plugin uses old support library:
flutter/.pub-cache/hosted/pub.dartlang.org/flt_telephony_info-0.1.1/android/src/main/kotlin/dev/bughub/flt_telephony_info/FltTelephonyInfoPlugin.kt: (7, 27): Unresolved reference: content
flutter/.pub-cache/hosted/pub.dartlang.org/flt_telephony_info-0.1.1/android/src/main/kotlin/dev/bughub/flt_telephony_info/FltTelephonyInfoPlugin.kt: (35, 17): Unresolved reference: ContextCompat
E/MethodChannel#bughub.dev/flt_telephony_info(25450): Failed to handle method call
E/MethodChannel#bughub.dev/flt_telephony_info(25450): java.lang.SecurityException: getImeiForSlot: The user 10204 does not meet the requirements to access device identifiers.
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at android.os.Parcel.createException(Parcel.java:2071)
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at android.os.Parcel.readException(Parcel.java:2039)
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at android.os.Parcel.readException(Parcel.java:1987)
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at com.android.internal.telephony.ITelephony$Stub$Proxy.getImeiForSlot(ITelephony.java:10419)
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at android.telephony.TelephonyManager.getImei(TelephonyManager.java:1726)
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at android.telephony.TelephonyManager.getImei(TelephonyManager.java:1687)
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at dev.bughub.flt_telephony_info.FltTelephonyInfoPlugin.onMethodCall(FltTelephonyInfoPlugin.kt:89)
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at android.os.MessageQueue.next(MessageQueue.java:336)
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at android.os.Looper.loop(Looper.java:174)
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at android.app.ActivityThread.main(ActivityThread.java:7447)
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E/MethodChannel#bughub.dev/flt_telephony_info(25450): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)
E/flutter (25450): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: PlatformException(error, getImeiForSlot: The user 10204 does not meet the requirements to access device identifiers., null, java.lang.SecurityException: getImeiForSlot: The user 10204 does not meet the requirements to access device identifiers.
flutter: {
callState:0,
dataNetworkType:null,
deviceSoftwareVersion:null,
imei:null,
isDataEnabled:true,
isSmsCapable:true,
isVoiceCapable:true,
line1Number:null,
meid:null,
nai:null,
networkCountryIso:in,
networkOperator:40486,
networkSpecifier:-2,
networkType:0,
networkOperatorName:,
phoneCount:2,
phoneType:1,
serviceState:null,
simCarrierId:-1,
simCarrierIdName:null,
simCountryIso:,
simOperator:,
simOperatorName:,
simSerialNumber:null
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.