问题
I'm developing an application for Android 2.3.4.
This app gets all calls in call log and sends them to a server. The app works very well but now I have a problem. I have to add the Dual SIM option.
I've looked around and it seems that Android mixes the call log register of the both SIMs. Well, since I have to get only log of 1 SIM, how can I do that? Can Android do something like that (determining on call log which SIM got called) or do I have to change Android version?
回答1:
Any application built on Android will guarantee only for Single SIM mobiles. Because Android does not support multiple SIMs, at least from the SDK. Device manufacturers who have created multi-SIM devices are doing so on their own. You are welcome to contact your device manufacturer and see if they have an SDK add-on or something that allows you to access the second SIM.
回答2:
There is a Way to find information about dual Sim in android API level 22 and above using SubscriptionManager, it provides a List SubscriptionInfo to the user which contain information about Multiple sims
SubscriptionManager subscriptionManager = SubscriptionManager.from(getApplicationContext());
List<SubscriptionInfo> mSimInfo = subscriptionManager.getActiveSubscriptionInfoList();
回答3:
there is a new app which does the same
search for 2SIMCallLogger on Google Play/Market
https://play.google.com/store/apps/details?id=com.mashibo&feature=search_result#?t=W251bGwsMSwyLDEsImNvbS5tYXNoaWJvIl0.
来源:https://stackoverflow.com/questions/11823462/call-logging-with-dual-sim