You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flutter 3.7.12
Android SDK version 33.0.0
Dart SDK version: 2.19.6
Added <uses-permission android:name="android.permission.READ_PHONE_STATE" /> to AndroidManifest.xml and confirmed it is in combined output manifest:
uses-permission#android.permission.READ_PHONE_STATE
ADDED from <path>\flutter\android\app\src\sms\AndroidManifest.xml:9:5-75
android:name
ADDED from <path>\flutter\android\app\src\sms\AndroidManifest.xml:9:22-72
Permission request pops up and is granted to the app.
Using List<SimCard> cards = await provider.getSimCards(); produces:
E/MethodChannel#plugins.elyudde.com/simCards( 7266): Failed to handle method call
E/MethodChannel#plugins.elyudde.com/simCards( 7266): java.lang.SecurityException: getDeviceId: The user 10161 does not meet the requirements to access device identifiers.
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at android.os.Parcel.createExceptionOrNull(Parcel.java:2373)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at android.os.Parcel.createException(Parcel.java:2357)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at android.os.Parcel.readException(Parcel.java:2340)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at android.os.Parcel.readException(Parcel.java:2282)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at com.android.internal.telephony.IPhoneSubInfo$Stub$Proxy.getDeviceIdForPhone(IPhoneSubInfo.java:983)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at android.telephony.TelephonyManager.getDeviceId(TelephonyManager.java:1985)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at com.elyudde.sms_advanced.telephony.TelephonyManager.getSimId(TelephonyManager.kt:26)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at com.elyudde.sms_advanced.SimCardsHandler.getSimCards(SimCardsProvider.kt:70)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at com.elyudde.sms_advanced.SimCardsHandler.handle(SimCardsProvider.kt:55)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at com.elyudde.sms_advanced.SimCardsProvider.getSimCards(SimCardsProvider.kt:97)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at com.elyudde.sms_advanced.SimCardsProvider.onMethodCall(SimCardsProvider.kt:90)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:258)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at android.os.Handler.handleCallback(Handler.java:938)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at android.os.Looper.loop(Looper.java:223)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at android.app.ActivityThread.main(ActivityThread.java:7656)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/MethodChannel#plugins.elyudde.com/simCards( 7266): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
I/flutter ( 7266): {isolates/3646761890875411}[F] (ActiveTab) *** ERR:Exception occurred when sending SMS message: PlatformException(error, getDeviceId: The user 10161 does not meet the requirements to access device identifiers., null, java.lang.SecurityException: getDeviceId: The user 10161 does not meet the requirements to access device identifiers.
I/flutter ( 7266): at android.os.Parcel.createExceptionOrNull(Parcel.java:2373)
I/flutter ( 7266): at android.os.Parcel.createException(Parcel.java:2357)
I/flutter ( 7266): at android.os.Parcel.readException(Parcel.java:2340)
I/flutter ( 7266): at android.os.Parcel.readException(Parcel.java:2282)
I/flutter ( 7266): at com.android.internal.telephony.IPhoneSubInfo$Stub$Proxy.getDeviceIdForPhone(IPhoneSubInfo.java:983)
I/flutter ( 7266): at android.telephony.TelephonyManager.getDeviceId(TelephonyManager.java:1985)
I/flutter ( 7266): at com.elyudde.sms_advanced.telephony.TelephonyManager.getSimId(TelephonyManager.kt:26)
I/flutter ( 7266): at com.elyudde.sms_advanced.SimCardsHandler.getSimCards(SimCardsProvider.kt:70)
I/flutter ( 7266): at com.elyudde.sms_advanced.SimCardsHandler.handle(SimCardsProvider.kt:55)
I/flutter ( 7266): at com.elyudde.sms_advanced.Sim
sms_advanced kotlin version manually overwritten per #45 (shouldn't be related).
Any ideas what is missing to view SIM card info? It looks like this permission may no longer be sufficient since Android 10, per this link that talks about READ_PRIVILEGED_PHONE_STATE permissions and new restrictions.
The text was updated successfully, but these errors were encountered:
Added
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
to AndroidManifest.xml and confirmed it is in combined output manifest:Permission request pops up and is granted to the app.
Using
List<SimCard> cards = await provider.getSimCards();
produces:sms_advanced kotlin version manually overwritten per #45 (shouldn't be related).
Any ideas what is missing to view SIM card info? It looks like this permission may no longer be sufficient since Android 10, per this link that talks about
READ_PRIVILEGED_PHONE_STATE
permissions and new restrictions.The text was updated successfully, but these errors were encountered: