Android & iOS access number dialing - android

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.

Related

how to text a clickable phone number including extension on android messages

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.

android send Dial Tone and detect end of input

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.

android how to get the emergency number to call

I see there are plenty of examples on how to call a number, and I also see that I can only have it pop up the dialer to go to an emergency number. But in all those example they hard coded "911" as the number to use. well this works fine in the US but since android phones are sold in other countries and thusly there is the possibility that my app will be bought by someone not in the US, or that someone who lives in the us may take their phone overseas; is there a way then my app can realize it's not in the us and thusly has to use a different number to call emergency service and what that number would be?
So to sum up I'd like to know if there is a way I can have it so when the app goes to bring up the dialer with the emergency number for the country it's in, with out having to know that number at complie time?
According to the source for PhoneNumberUtils.isEmergencyNumber():
String numbers = SystemProperties.get("ril.ecclist");
if (TextUtils.isEmpty(numbers)) {
// then read-only ecclist property since old RIL only uses this
numbers = SystemProperties.get("ro.ril.ecclist");
}
numbers will be a comma separated list.

Intent resolution in Android

If I want to create custom address book (which overrides my phone's default address book), and if I want it to be used by all applications, what should be my intent-filter? Does Android allow me to do such a thing considering the fact that such a third-party app could potentially be malicious?!
And, if I want to have yet another address book application, I suppose the second app also has same intent-filter, isn't it? How does the framework decide which app to pick if I click on Contacts button when making a call? In other words, how does the framework resolve intents in case,there is a conflict between multiple intent-filters?
You can replace any application on Android platform, even Home. Android documentation explains everything there is to know about Intents and Intent Filters and there is a section called Intent Resolution that answers your question. Intent Resolution section for Intent class has some additional information.
As far as I can tell Android doesn't try to resolve a conflict. It ask the user which application to run and gives them the choice to mark this Activity as the default for this Intent. They give an example about mail app here.
While Mr. Smiljanić is basically correct, there is no Contacts application in Android for you to replace. There is Dialtacts, which is the application supporting the contacts, call log, and dialer. That application cannot be replaced, mostly because the dialer cannot be replaced.
So, while you may be able to override some intent filters and get control on some contacts-related requests, you will be unable to get the contacts portion of Dialtacts overridden, which will confuse users.

Is there a way to to create a custom answering machine in android?

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...

Categories

Resources