Code Monkey home page Code Monkey logo

flt_telephony_info's Introduction

Hi there 👋

  • 🔭 I’m currently working on Chinahrt
  • 🌱 I’m currently learning dart、Flutter、Golang
  • 📫 How to reach me: [email protected]

flt_telephony_info's People

Contributors

randywei avatar ristiisa avatar via-guy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

flt_telephony_info's Issues

Example app fails

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

Spams log output on call.

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
}

telephonyManager.allCellInfo 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)

🤔 Is this repo still alive? ☠️

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.

Not Work

I tried running the example project, but it didn't work.

Null-safety is not supported

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?

Migrate to androidx

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

Failed to handle method call

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.

Unable to get proper values

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
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.