telephonymanager

MNC and MCC of a secondary SIM

青春壹個敷衍的年華 提交于 2020-01-07 03:22:07
问题 I know that using TelephonyManager we can get MNC and MCC of our network provider, TelephonyManager tel = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String networkOperator = tel.getNetworkOperator(); if (networkOperator != null) { int mcc = Integer.parseInt(networkOperator.substring(0, 3)); int mnc = Integer.parseInt(networkOperator.substring(3)); } But I was able to get MNC and MCC data of only primary sim. I would like to know is there a way to fetch mnc,mcc,lac and

How to cancel outgoing phone call on android 6.0.1

∥☆過路亽.° 提交于 2020-01-06 06:40:11
问题 I have the receiver that is triggered when outgoing call is placed. Now I am trying to figure it out how to cancel the outgoing call. The phone I need to implement this has 6.0.1 SDK 23 android version, and it is a company phone for a specific purpose. I was able to implement it in version 8 of android with this approach TelecomManager telecomManager = (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE); telecomManager.endCall() but on android 6.0 I get no permission on if

How to cancel outgoing phone call on android 6.0.1

跟風遠走 提交于 2020-01-06 06:40:06
问题 I have the receiver that is triggered when outgoing call is placed. Now I am trying to figure it out how to cancel the outgoing call. The phone I need to implement this has 6.0.1 SDK 23 android version, and it is a company phone for a specific purpose. I was able to implement it in version 8 of android with this approach TelecomManager telecomManager = (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE); telecomManager.endCall() but on android 6.0 I get no permission on if

getAllCellInfo - duplicate values

北城以北 提交于 2020-01-03 19:04:29
问题 I am using getAllCellInfo to acquire serving- and neighboring cell info from my phone ( unrooted LG G5 - for what it's worth), but the function returns duplicate data for all the neighboring-measured towers. In the area that I'm in, my test data is 3G (WCDMA) most of the time. Here's an extraction of my WCDMA results, showing the raw string and parsed values (in code quoted for readibility): Site_0 Registered: true dBm: -99 Raw str: CellIdentityWcdma:{ mMcc=655 mMnc=1 mLac=63 mCid=9538943

Is there any API support to make conference calls programmatically in Android?

╄→гoц情女王★ 提交于 2020-01-01 11:54:53
问题 I would like to make a conference call by selecting some contacts from my app, is it possible? also is there any limit on the number of devices in conference call? Is there any Android SDk support,any version is fine for me? Plz give some inputs.. Thanks In Advance. 回答1: You cannot manage a conference with a smart phone. You need an intermediate service that can do this for you. You can program a conference manager using CCXML. Voxeo has a good hosted platform for CCXML implementations and

How to get phone number of a device programmatically [duplicate]

China☆狼群 提交于 2019-12-28 02:51:09
问题 This question already has answers here : Programmatically obtain the phone number of the Android phone (15 answers) Closed 5 years ago . I am trying to get phone no using following method: private String getMyPhoneNumber() { TelephonyManager mTelephonyMgr; mTelephonyMgr = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); //String imsi = mTelephonyMgr.getSubscriberId(); String phnNo = mTelephonyMgr.getLine1Number(); if (phnNo == null) { phnNo = getNoFromWatsApp(); } return phnNo;

unable to end call in android verstion 2.2.6

[亡魂溺海] 提交于 2019-12-25 08:57:29
问题 i trying to end call using below method to e private void getTeleService(Context context) { TelephonyManager tm = (TelephonyManager) context .getSystemService(Context.TELEPHONY_SERVICE); try { Class c = Class.forName(tm.getClass().getName()); Method m = c.getDeclaredMethod("getITelephony"); m.setAccessible(true); com.android.internal.telephony.ITelephony telephonyService = (ITelephony) m.invoke(tm); telephonyService.silenceRinger(); telephonyService.endCall(); } catch (Exception e) { e

How to store call records in SD Card?

做~自己de王妃 提交于 2019-12-25 08:24:49
问题 I am trying to store incoming and outgoing calls record in my SD Card. but the issue is that i am not able to find that in my SD Card. Following is my Code Can any one help DeviceAdminDemo.java public class DeviceAdminDemo extends DeviceAdminReceiver { @Override public void onReceive(Context context, Intent intent) { super.onReceive(context, intent); context.stopService(new Intent(context, TService.class)); Intent myIntent = new Intent(context, TService.class); context.startService(myIntent);

How to abort an outgoing call after fixed seconds?

落花浮王杯 提交于 2019-12-25 05:56:20
问题 I am working on android app which can make missed call on other phone of particular duration like 5, 10 seconds, I am struck once call is made through a program to a particular number my program loose control, how I can end after some fixed no. of seconds after call is made, the general purpose SDK only allow to initiate call not for abortion. I am new to android and done a deep search on net about this some folks refer using JAVA reflection and internal telephony for this but I wasn't able

How to get the caller's number?

落花浮王杯 提交于 2019-12-24 12:53:03
问题 I am creating one application,what I am trying is whenever user cut or disconnect call,one alert dialog should appear with caller's number,I followed this tutorial public class MyCallReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { // TODO Auto-generated method stub if (intent.getStringExtra(TelephonyManager.EXTRA_STATE).equals(TelephonyManager.EXTRA_STATE_RINGING)) { // get the phone number String incomingNumber = intent.getStringExtra