I'm developing a little app which needs to start a simple call and send some DTMF tones.
By searching on the net i found that the correct way for doing it should be the following:
Intent i = new Intent("android.intent.action.CALL",
Uri.parse("tel://" + number + "," + dtmfTones));
Now, my problems are 2:
I need to shut down the call after tones are sent.
If possible I would like not to open the default dialer.
My app only needs to perform the call and send the tones, so the user has nothing to do nor interact with and that's why I don't need to open the dialer, it can also be done in background. Is there a way to do those things?
Thanks all and sorry for my not perfect english.
EDIT1: I tryed this method and I performed a call to another mobile number I have under control. The tones are sent and you can listen them without any problem.
EDIT2: i found also some apps which uses an unusual sequence of "#", ",", ".". but it is still not working, any idea?
I tryed to perform the same call to the house number which has to reply (it's a security system) but it doesn't recognize them. I don't know what I'm missing.
Related
How do I text a clickable phone number that includes the wait to dial extension on android messages?
on iOS I would simply type 8008008000; 123456# and I can even text that to iOS from android and it works, but when I text that to other android phones, the full link gets broken and android only dial the number from the message, requiring going back to the message to copy the extension for paste into dialer of active call.
I want the wait functionality, not the pause function.
I can create contacts in android like 8008008000; 123456# and they operate as desired, the solution I am after will not include creating the contact then sharing the contact.
I need to know what to type in and hit send, and it work for the recipient as desired.
typically it would be a comma (8008008000,123456# with NO spaces.) but its been my experience that .5 seconds (,) is insufficient for the number to be picked up and the IVR to register. a full second is more common, (8008008000,,123456# ) however, Android doesnt seem to parse a double-comma.
I am using this code to make call
Intent callIntent = new Intent(Intent.ACTION_CALL,
Uri.parse("tel:" + phoneNumber));
startActivity(callIntent);
and I want to disconnect call after hear first ringing to leave a miss call on the destination phone.
I don't believe that's currently available in the Android sdk. I was trying to control outgoing calls on a project recently but other than dialing a number there's not a lot you can do. My last project needed to place a call, press a button, then hangup. For that I ended up setting up an Asterisk server that listened to a web page. You could do something similar but that would involve using a data connection to your own server.
You can check out these links. I don't like this answer but it's the way it is for now.
How to make a phone call in android and come back to my activity when the call is done?
http://developer.android.com/reference/android/content/Intent.html#ACTION_CALL
If you want to step outside of techniques I would recommend check out the this answer.
I am very new to both these operating systems so please excuse me if my question is basic :-)
We are planning a secure dialing system which means dialiing 2 numbers in one phone number dailing session.
Currently we have a system which allows us to dail an access number, wait for a tone and then dial a full telephone number.
It's a bit elaborate but like I said, it's a security feature.
What we are now trying to do is create Android and iPhone apps that will allow us to dial the access number + telephone number at the click of a virtual button :-)
Can anyone tell me how this can be accomplished programmatically? I need to implement something like access-number#phone-number or anything that works.
Thanks.
Both iphone and android support making phone calls in the same sort of manner.
You need to construct a URL and 'run' the url. Both iphone and android don't support any sort of call control so you have to make do with the url to make a phone call. They both support 'pause' character and dtmf tones in the url.
The iphone don't support some characters, notably the '#' and '*' characters. Because the '#' character is not supported (for security reasons), it can make it hard dealing with PBX systems.
On the android you have to 'encode' characters manually or using URLEncoder. I have not had any luck supporting the '#' character in Android but I have seen reports of it working. You will need to test this to see if it works for you.
For iphone you use the UIApplication openURL: to a tel link.
e.g.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"tel:123456p12345"]];
For android you use the INTENT_DIAL or ACTION_CALL.
INTENT_CALL will display the phone dialler with you number filled out. It does not require any special setup.
e.g.
Intent dialIntent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:123456"));
startActivity(dialIntent);
ACTION_CALL requires the CALL_PHONE permission in your manifest file.
e.g.
AndroidManifest.xml:
Intent dialIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:123456%2C12345"));
startActivity(dialIntent);
I'm not quite sure if this is what you're looking for but.
You could create a button in your layout.
Create a pointer to it in your main activity // findViewById();
OnClickListener on the Button.
in the onClick, fire a Dial Intent with the number of choice.
If this isn't what you're looking for I'm afraid I'll need a bit more information on what it truely is, because at this point that's the only thing I can manage to think of with the description given.
Can someone give me a tip on how to capture the values presses on the android dial pad? I think i should use a broadcast receiver for it
Are you trying to capture the values for a dialler related app? If you are, you can just capture the whole dialled string (ON_NEW_OUTGOING_CALL event) using getResultData(). If this returns null, you can then use intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER).
From memory you need the PROCESS_OUTGOING_CALL permission, and possibly some others, set in your manifest.
At this point, if you want to do anything with the number, you can modify the string and then just setResultData(newNumberString);
The only adendum at this point is that setResultData doesn't work with phones using the sense interface. With those, you actually need to start a new intent to be able to dial(until HTC finally open up their dev website..)
I'd like to create an app that allow you to filter incoming call to various answering message with :
"this number is not available" for black listed phone numbers
A formal message for strangers
A informative message about what your doing for friends
I don't know how you can get automatically a call, play a recorded message then wait for the answer and record it. Or maybe there is just a way to interact with the actual answering system so I just have to plugin.
Any clue strongly appreciated. A human sacrifice for any code snippet :-)
Access to the internal telephony is not possible or planned for future releases of Android:
http://groups.google.com/group/android-developers/browse_thread/thread/e8904c82a2c4a333
This would present a security risk as app developers could intercept and hijack sensitive calls (eg. telephone banking)
This is not possible on the tmobile G1 at this time. There is no way for an android SDK application to access the call input or output on this hardware/firmware combination.
http://groups.google.com/group/android-developers/browse_thread/thread/d04c307973345fef/a628e578900b3dce?lnk=gst&q=dave+sparks+play+audio#a628e578900b3dce
and
http://groups.google.com/group/android-developers/browse_thread/thread/185e33a3f420d1ac/e14e1dc84bb6dd24?lnk=gst&q=play+sound+call#e14e1dc84bb6dd24
I'm not sure this answers the question, but it is somewhat related I think.
You can install Ultimate Voice Recorder which can record your conversations (very useful when calling customer 'service'). Since it can record it, it must have some way to access the conversation.
Also, the capabilities you have to give the app are quite scary (translated from dutch: full internet access, intercept outgoing calls, change preferences, call phone numbers directly, record audio/take pictures, update contacts, auto startup). It seems to me there must be something in there that can help you?
However, I don't think it can inject audio into the stream. The symbian version had an option to insert beeps into the conversation, but I don't think the android version has it.
http://www.fingertip-access.com/
I have found out att for this use of your Phone Android or ISO, so far they ar decades behinde symbian and an inferior alternativ sadly, if you don't install a custom kernel/jailbreak it's not possible to record incoming calls and screen them. "Ultimate Voice Record ned you to use the phone in speaker mode."
it is possible to record voice calls with automatic answer. An update on this issue would be very helpful...
It is possible to have a resource that answers the calls. Enter a message and record the call. And together don't activate the microphone...
In short, an answering machine...