telephony

How to detect if device is capable of calling and messaging

大城市里の小女人 提交于 2019-11-29 13:26:38
Some devices ie. Galaxy Tablet 10.1 can only send SMS, but cannot call. Some other devices like Asus Transformer don't even have SIM card. How can I detect if device can makes calls? And how can I detect if device can send SMS? Joe Maybe you can query the PackageManager whether the system contains any component that can respond to ACTION_CALL and ACTION_SENDTO intents? You might need to add the "tel:" and "smsto:" scheme in the URI. Using this technic you can test all sorts of things too e.g. compass, is location available PackageManager pm = getBaseContext().getPackageManager(); pm

Bluetooth dial with 32feet.net and c#

梦想的初衷 提交于 2019-11-29 06:58:17
I am trying to provide a "click to dial" solution for someone to a bluetooth device such as a mobile phone. I have been trying to do so using the 32feet.net bluetooth api. I haven't really done anything with bluetooth (since the days of at commands via a bluetooth serial port) but I have paired the device in question, which supports the handsfree service with the pc. I have the following code to attempt to connect and send a dial command. String deviceAddr = "11:11:11:11:11:11"; BluetoothAddress addr = BluetoothAddress.Parse(deviceAddr); BluetoothEndPoint rep = new BluetoothEndPoint(addr,

Android DTMF send tone overriding

↘锁芯ラ 提交于 2019-11-29 00:47:42
I tried to programmatically send DTMF tones in Android. But the emulator shows up a dialog box that says "Do you want to send these tones?" and it sends the tones only if I click OK. But how can I programmatically overcome this dialog box? Gracias In my application, I am sending DTMF tones (with gap using ","). Please see the code below. If you put number as: 12345,6,7 it will dial 12345 and send 6 and 7 as dtmf tone with gap. String url = "tel:" + number; Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(url)); startActivity(intent); /** * Dials a number with DTMF chars * Note: When

How make use of the Voice API to make calls using Huawei 3g Modems?

江枫思渺然 提交于 2019-11-28 22:01:32
Some Huawei 3g modems like mine (E1752) has ability to make and receive calls. I believe onboard there is PCM channel that can be used while making or receiving the calls but I do not have any more information on that. I am using their app called the Mobile Partner which is a fairly complete app which supports making and receiving calls. But I want to build my own app which will run on Mac OS X. But I am not able to locate any documents detailing the Voice API and the onboard PCM channel. If anybody is aware of this please let me know. Thanks Harryd Sai Chaitanya Voice is implemented as

How to retrieve missed calls on Android SDK 2.2

人走茶凉 提交于 2019-11-28 19:54:42
in my app I should do some action when a call comes but not answered by the user. I have searched in the android.telephony and the NotificationManager , but I haven't found a method to solve this problem. Does someone have an idea of how to get to know if there is a missed call on the phone or not ? Here is code that can query the call log for a missed call. Basically, you will have to trigger this somehow and make sure that you give the call log some time ( a few seconds should do it) to write the information otherwise if you check the call log too soon you will not find the most recent call.

Sending mms in android 4.4

╄→гoц情女王★ 提交于 2019-11-28 10:43:50
问题 Im trying to send mms from my app only. I made it default messaging app with help of android developers tutorial (http://android-developers.blogspot.com/2013/10/getting-your-sms-apps-ready-for-kitkat.html). My manifest: BroadcastReceiver that listens for incoming SMS messages: <receiver android:name="com.test.SmsReceiver" android:permission="android.permission.BROADCAST_SMS"> <intent-filter> <action android:name="android.provider.Telephony.SMS_DELIVER" /> </intent-filter> </receiver>

Change mobile network mode (gsm, wcdma, auto)

余生长醉 提交于 2019-11-28 07:39:59
I want to change the preferred network mode ie. gsm or wcdma or auto, programmatically, from code, on Android. Is this possible, and if so how ? Answer is NO We can open directly the settings app of mobile network settings to switch between "2G" and "allow 3G" networks.A direct switch is sadly not possible. We can develop something which will show current network and allow user short-cut from the app where they can switch network. Tulio F. It is possible, I did it. For this to work, your app must be signed with the system key or have carrier privilege. Otherwise the app will throw java.lang

How to get current cell signal strength?

老子叫甜甜 提交于 2019-11-28 07:38:49
I would like to store the cell signal strength, and I do it like this: private class GetRssi extends PhoneStateListener { @Override public void onSignalStrengthsChanged(SignalStrength signalStrength) { super.onSignalStrengthsChanged(signalStrength); Variables.signal = signalStrength.getGsmSignalStrength(); } } Okay but this only runs if it changes. I need the current signal strength. Is there a method to just ask for the current signal strength? Michal There is getAllCellInfo() method in TelephonyManager added in API 17 that could be good solution. Example of use: TelephonyManager

How to get the country code for CDMA Android devices?

情到浓时终转凉″ 提交于 2019-11-28 01:22:44
Does anyone know how to retrieve the country code information for Android devices under CDMA networks? For all others, you can just use the TelephonyManager for that: String countryCode = null; TelephonyManager telMgr = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE); if (telMgr.getPhoneType() != TelephonyManager.PHONE_TYPE_CDMA) countryCode = telMgr.getNetworkCountryIso(); } else { // Now what??? } I searched a bit but did not find any useful information that would lead to an answer. Some ideas some to mind: GPS location: you can get the country from GeoCoder ; and IP

How do I get state of a outgoing call in android phone?

北城余情 提交于 2019-11-28 01:12:37
I noticed in the class TelephonyManager there are CALL_STATE_IDLE, CALL_STATE_OFFHOOK and CALL_STATE_RINGING. They seem to be used for incoming calls. What I actually want to do is to be notified when an outgoing call is made, is received, or timed out. How to do that? From what I understand, you can detect that an outgoing call has been initiated because the phone state changes from idle to offhook. However, from there, knowing the state of that call- ie knowing if the call you are placing is ringing, being transferred to voice mail, actually picked up or just timed out appears to be