dual-sim

How to know SimSlot Number for every Call / sms?

∥☆過路亽.° 提交于 2019-12-01 03:42:35
You know the sim slot number only in broadcast receiver. After one month of research I got one solution which is work fine for me as below Firstly Add the android.permission.READ_PHONE_STATE permission to your manifest file Implement receiver for the phone event which receive call/sms events for your application public class CallSMSReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Bundle extras = intent.getExtras(); if (extras != null) { Log.d("SIM_SLOT"," Slot Number "+capturedSimSlot(extras)); } } /*below methods captures the sim slot

Get operator details for dual SIM android phone

谁都会走 提交于 2019-12-01 01:17:26
I am working on an app where I need details of user's SIM his phone number, imei number and operator . so far I have achieved his IMEI's numbers refering this answer , is his device single sim or dual SIM. How do I get his number of both the SIM and the name of operator for both the connections. Ana Llera Try this, works for me: TelephonyManager manager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String carrierName = manager.getNetworkOperatorName(); Fortunately there are several native solutions. Hope this will help somebody. For API >=17: TelephonyManager manager =

Call logs for dual sim android device

大兔子大兔子 提交于 2019-12-01 00:23:33
I am using the below code to get the call log details which is working very fine for single SIM device, but the problem arises when it comes to the DUAL sim. I am trying to find work around for getting logs from dual sim device. /** * Get All Call Logs details as JSON * * @param context */ @SuppressLint("SimpleDateFormat") private void getInitialCallDetailsAsJSON() { // Print dates of the current week starting on Monday DateFormat df = new SimpleDateFormat("dd-MMM-yyyy hh:mm aa", Locale.getDefault()); final Uri contacts = CallLog.Calls.CONTENT_URI; final Cursor managedCursor =

Get operator details for dual SIM android phone

扶醉桌前 提交于 2019-11-30 20:41:44
问题 I am working on an app where I need details of user's SIM his phone number, imei number and operator . so far I have achieved his IMEI's numbers refering this answer, is his device single sim or dual SIM. How do I get his number of both the SIM and the name of operator for both the connections. 回答1: Try this, works for me: TelephonyManager manager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String carrierName = manager.getNetworkOperatorName(); 回答2: Fortunately there are

How to find out which SIM is making the outgoing call (Dual SIM)

馋奶兔 提交于 2019-11-30 09:43:44
I would like to check which SIM is making an outgoing call for DUAL SIM android phones. Read this article Android : Check whether the phone is dual SIM . Works like a charm, detects the sim state and if phone is dual SIM. Next step is to get SIM info during an outgoing call request so that i know which SIM is making the call and according to that take some action. Can someone help me with that? Fernando Rama I've tested and for Jelly Bean I was able to successfully identify the dialling SIM card. Tested also with triple SIM device and worked like a charm. Code snippet for this inside your

Android dual SIM signal strength

可紊 提交于 2019-11-29 15:11:22
问题 I have been trying to get access to some features on my android dual sim phone (the brand is LKD). I have managed to get the functions for TelephonyManager and ITelephony through java reflection, and got them to run. However i want to get the signal strength for both of the sim cards and i cannot see a way to do this through the reflection. I can get the first sim card in slot 1 through having a PhoneStateListener with the function onSignalStrengthsChanged(). Does anyone have some tips for

Programmatically retrieve IMEI number for dual SIM in android

徘徊边缘 提交于 2019-11-27 20:45:39
For single SIM following code works: TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE); String imei= tm.getDeviceId(); For dual SIM I tried code on following link: Android : Check whether the phone is dual SIM But it didnt work for me. Let me know if any other solutions possible. Vijay Shelke We can check whether phone single or dual sim by using Android API and IMEI for each sim Card TelephonyManager manager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); Log.i("OmSai ", "Single or Dula Sim "+manager.getPhoneCount()); Log.i("OmSai ", "Defualt device

Programmatically retrieve IMEI number for dual SIM in android

梦想的初衷 提交于 2019-11-27 04:28:09
问题 For single SIM following code works: TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE); String imei= tm.getDeviceId(); For dual SIM I tried code on following link: Android : Check whether the phone is dual SIM But it didnt work for me. Let me know if any other solutions possible. 回答1: We can check whether phone single or dual sim by using Android API and IMEI for each sim Card TelephonyManager manager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);

Call from second sim

喜夏-厌秋 提交于 2019-11-26 19:47:46
I have a dual sim android phone. I am using this code to make a call: private void callBack(String phone, Context context) { Intent callIntent = new Intent(Intent.ACTION_CALL) .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); callIntent.setData(Uri.parse("tel:" + phone)); context.startActivity(callIntent); } It's working fine. But it always makes call from sim1(preferable sim). How do I make calls from Sim2? Is there a way to handle dual sim phones? This seems to work on a large range of dual sim devices as Motorola, Micromax, HTC, Samsung intent.putExtra("com.android.phone.extra.slot", 0); //For sim

Call from second sim

一个人想着一个人 提交于 2019-11-26 07:27:16
问题 I have a dual sim android phone. I am using this code to make a call: private void callBack(String phone, Context context) { Intent callIntent = new Intent(Intent.ACTION_CALL) .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); callIntent.setData(Uri.parse(\"tel:\" + phone)); context.startActivity(callIntent); } It\'s working fine. But it always makes call from sim1(preferable sim). How do I make calls from Sim2? Is there a way to handle dual sim phones? 回答1: This seems to work on a large range of dual