phone-call

How to check Phone calling service is enable or not in android device?

橙三吉。 提交于 2019-12-11 11:42:23
问题 I want to know that how to check that phone call service is enable or not in different devices, i have Micromax Funbook(p300) Tablet(Android 4.0.3), in which there is no calling service, and i am using below code to check that TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); if (tm.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE) { Log.v("TAG", "No calling service"); }else{ Log.v("TAG", "calling service"); } but this is not working. it always gives

Twilio total call duration does not match with billing minutes

喜欢而已 提交于 2019-12-11 09:10:27
问题 In the attached image , the total voice minutes for July is 30 minutes. However if I pull the call logs for the same month July 2014 (using the instruction in https://www.twilio.com/docs/api/rest/call) , I get total duration as 17 minutes. Shouldn't the value of usage and total call duration in Log be equal ?. Here is my test source code for finding the call log files for month July 2014. Any help is greatly appreciated. public static void callLogs(string AccountSid, string AuthToken) { var

Why cant I set TextView to display incoming call phone number?

ぐ巨炮叔叔 提交于 2019-12-11 09:09:00
问题 I have an app that replaces the standard incoming call screen with my own design. When someone calls, my custom screen pops up. This is good, but for some reason, my app fails to display the incoming phone number. The incoming phone number shows in LogCat, but when I try to set the TextView to that String, nothing shows. Here is the code that retrieves the incoming phone number: Bundle extras = intent.getExtras(); phoneNr = extras.getString("incoming_number"); Log.v(TAG, "phoneNr: " + phoneNr

how to make a call, without using intent

泪湿孤枕 提交于 2019-12-11 09:07:56
问题 How can I make a call without/with user interaction. I found the intent Intent.ACTION_CALL on the internet, but I want to write program like the one which initiates a call in response of this intent, is this possible? If this is possible, then how can I do this? I do not want to initiate a dialog to dial for a call, I want to internally make a call in my application. Is there any java library, which I can use for this purpose? 回答1: Use Intent. That's how it is designed to work in Android: try

Phone call from Apple Watch with openSystem API?

∥☆過路亽.° 提交于 2019-12-11 09:07:53
问题 As I watched the WWDC 2015 session video "Introducing WatchKit for watchOS 2" (at 13:29), I saw that it is possible to make phone calls directly on Apple Watch with the openSystem API. How can I use this API in Swift? 回答1: You can use the openSystemURL method, which is available on the shared WKExtension object. Pass a tel: URL to this method to initiate a phone call. if let telURL=NSURL(string:"tel:5553478") { let wkExtension=WKExtension.sharedExtension() wkExtension.openSystemURL(telURL) }

Auto dial out issue in asterisk

故事扮演 提交于 2019-12-11 08:53:35
问题 I am applying an auto dial in asterisk using .call file My a.call Channel: DAHDI/g0/09********* MaxRetries: 1 RetryTime: 600 WaitTime: 30 Context: outgoing Extension: 10 Priority: 1 My problem is that every time above number is called by same number means even if i change the dialled number(receiver number above) the caller number is same. How can i set the caller number in an outgoing call? Thanks in advance. 回答1: You can use Channel: DAHDI/g0/09********* MaxRetries: 1 RetryTime: 600

How to calculate the outgoing call ( which I dialed from my app) duration in android programmatically

[亡魂溺海] 提交于 2019-12-11 08:19:51
问题 I have given the permission in manifest.xml file <uses-permission android:name="android.permission.CALL_PHONE"/> <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"/> <uses-permission android:name="android.permission.READ_PHONE_STATE"/> And define a receiver: <receiver android:name=".OutgoingCallReceiver"> <intent-filter> <action android:name="android.intent.action.PHONE_STATE" /> </intent-filter> </receiver> The receiver file is: public class OutgoingCallReceiver

Make incoming call in Android emulator without command code

二次信任 提交于 2019-12-11 07:52:32
问题 I'm trying to develop a small app that will be registered on PhoneStateListener and do some magic over incoming and outgoing calls monitor. For debugging purposes, I need to trigger onCallStateChanged(...) event from outside of phone, not perform real incoming voice call. Is it possible to do this somehow with sending phone number to debugged app without command line code? 回答1: create one more emulator on avd machine. You can find the emulator number from top of the emulator. Eg. 5554 this

How to get outgoing call is answered in Android

假如想象 提交于 2019-12-11 02:54:22
问题 I need a way to get the the status when a outgoing call is answered. However, in the OFFHOOK state I am also using to call for the outgoing call(ACTION_CALL). How can I add the awnsered state without overriding the outgoing call activity? public class OutgoingBroadcastReceiver extends BroadcastReceiver { private Intent mIntent; private String phonenumber = null; public static boolean wasRinging; @Override public void onReceive(Context context, Intent intent) { mIntent = intent;

How to make phone calls programmatically in Android?

二次信任 提交于 2019-12-11 01:57:40
问题 I have the following layout defined in useful_numbers_item_fragment.xml: <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:id="@+id/call_linear_layout"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/useful_nums_item_name"/> <TextView android:layout_width=