获取用户SIM卡的列表并选择它-Flutter
对于flutter应用程序,有必要使用用户的SIM卡发送SMS,为此,我希望可以在Dual-Sim手机中选择所需的SIM卡。
我检查< sms_plugin 包装,但是用户无法选择您必须在代码中选择SIM卡。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
对于flutter应用程序,有必要使用用户的SIM卡发送SMS,为此,我希望可以在Dual-Sim手机中选择所需的SIM卡。
我检查< sms_plugin 包装,但是用户无法选择您必须在代码中选择SIM卡。
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
https://pub.dev/packages/mobile_number
您可以尝试
代码snippe t
you can try https://pub.dev/packages/mobile_number this package,
Add dependency
Code snippet
我会倾向使用此库:
https://pub.dev/packages/sim_data
I would lean this library to use:
https://pub.dev/packages/sim_data
您可以在Android API和Flutter之间创建通信通道以获取SIM卡列表。
例如。
否则您可以使用此Flutter软件包
https://github.com/flutter-moum/flutter-moum/flutter_sim_info
You can create communication channel between Android API and Flutter to get sim list.
Eg.
https://github.com/flutter-moum/flutter_sim_info/blob/master/android/src/main/java/flutter/moum/sim_info/MethodHandlerImpl.java
or else you can use this Flutter package
https://github.com/flutter-moum/flutter_sim_info
获取设备sim信息
使用 autoussdflutter 软件包,以获取SIM卡详细信息的详细信息,以获取SIM卡
SIM SIM的详细信息,以将SIM
转到实际选择一个sim以发送消息(在多SIM电话中)在颤音侧很棘手,也取决于用户的SIM卡设置:
大多数软件包的时间(例如电话)似乎将其委派给了设备(即允许允许设备带来提示,以便用户选择SIM,或者仅使用默认的SIM,如果设置了),
如果要覆盖此信息并明确设置SIM卡,则可能需要查看特定于平台的解决方案。
Get Device SIM Information
Use the AutoUssdFlutter package to get the details of SIM cards
Set SIM To Send SMS
To actually select a SIM to send the message with (in a multi-SIM phone) is tricky on the Flutter side, and also depends on the user's SIM setting:
Most packages (E.g. Telephony) seem to delegate this to the device (I.e. allow the device to bring a prompt for the user to choose the SIM or just use the default SIM, if set)
If you want to override this and explicitly set the SIM to use, you may need to look into a platform specific solution.