I'd like to trasmit data (in the form of a single extra digit) to the called party when making a call. Both users naturally need to have my app installed.
For example: Person A makes a call to Person B, my app cancels the outgoing call, appends a "*1" (e.g.) to the called number and re-initiates the call. My app on Person B's phone listens to incoming calls and extracts the extra digit from the called number.
Is something like this possible? Please note that I can't use public void onCallStateChanged(int state, String incomingNumber) {} for this, since incomingNumberis the caller's (Person A's) number, not the called number. I need to be able to extract the extra-digit before the call has been picked up, so I can't use por wDTMF-dial-codes.
I've got the "intercept-and-redial"-portion on the caller's side, and the "listen for incoming calls"-portion of the app working, I just can't figure out how to A) transmit the digit so that it arrives at the called party's phone (rather than being dropped by the carrier) and B) get the called number on the receiver's phone.
Thanks!
I think, but I'm not sure, that you can't just transmit data like this. The reason is that the carrier directs calls with those numbers (codes). Transmitting an extra number(or an extra single digit) means wrong (or incorrect) number and will probably cancel the call. What you want to do seems to me like a way to manipulate the network, but I don't think it's possible. The data center of the carrier has probably at least some kind of a check on this.
I don't know why you need those symbols "*1" to be transmitted, but since this is hardcoded, it can easily be hardcoded into your application too. I think that you can use the telephone number to identify the calling party, but if you need to transfer information dynamically this way, it should not be possible.
Maybe you should try communicating directly with the other device, which has your app installed. Here's an interesting THREAD about this, even though there, this kind of communication is used for multiplayer games it provides a way for the devices to communicate.
Related
My question may look a bit strange.
I want to know if, in android, it is possible to know which number has been called when you receive an incoming call (I'm not speaking about caller id).
For example: let's assume that my phone number is 555-12345, my operator will route to my phone every number starting with 555-12345.
This means that you can call me by dialing 555-12345, but also by dialing 555-12345-37967 or 555-12345-34 etc.
Is there a way to know which number the caller has dialed?
If it is not possible to do this using Android API, would be possible to achieve my goal at lower level? Maybe using a customized firmware?
I was searching for this and not found any answer, the sample app (sipDemo) do not handle incoming call too. Fortunately I found the answer:
mSipManager.getSessionFor(intent).getPeerProfile().getUserName()
Good luck ;)
I'm currently working on an Android project that will need connecting to a Bluetooth device that will dispatch messages to different nodes. This means that I will have to pass the right messages to the appropriate nodes (many micro-controllers).
At the moment, I can send a string or receive a string from the master micro-controller and I think the best way to solve my problem will be that the master micro-controller node simply repeats and broadcasts the message to all the others nodes. For the Android part, I was wondering if it was a good practice to make an array that will contain the id of the receiver and after the data I want to send. The ID will be on 8 bits and the data will be a string. After I will cast the int to a string and concatenate both strings to send my id+data.
Is this a good way to solve my problem or there is a more elegant way to do so?
It would be more efficient to cast the string to bytes and send it all as an array of bytes. Serious network protocols would never use text data like that. If you're just doing a for-fun trial that's ok though.
Here's the real problem I see with your mesh- infinite exponential propagation. Lets say I send a message to someone, and do it by sending it to all of my neighbors. They'll forward it to all their neighbors. Who'll forward it to all their neighbors. Which if there's ever any loop in the graph will cause it to get sent back to someone who's already seen it, who will forward it again. And it will never die. Unless you have no loops, in which case you don't have a mesh and you're very fragile and will likely fragment. You need some way of preventing retransit of the same message- possibly as simple as a message id field and not retransmiting the same message id again. You'd need a large pool of message numbers for that though- something like a 128 bit UUID.
The issue seems simple enough - provide your own app that intercepts dial commands, and then dials them itself (imagine a VoIP application that if connected places a VoIP call, and if not connected, uses the phone's cellular capabilities to make the call).
this thread provides all the information you'd ever need - except there's a bit of a glitch:
Not every application seems to be using the same intents. I figure Intent.ACTION_DIAL must be the recommended standard option, and sure enough, most apps do that. Then there's Intent.ACTION_CALL_BUTTON, which seems to be of an oddity (my S3 tells me it has no application handling this action in the first place) and finally Intent.ACTION_CALL_PRIVILEGED.
Doing a little trial and error I figured that "native" apps (I'd call the native call log and contact application native) seem to be using Intent.ACTION_CALL_PRIVILEGED, whereas the rest uses INTENT_ACTION_CALL. And there lies the rub... if you register for both actions, then sure enough you can catch every dial command, but then what do you do with it? You can't fire off an intent with either of these actions since that'll just get you an infinite loop, there's no lower level action, and TelephonyManager conspicuously misses a makeCall method.
Since you cannot dynamically register and unregister intent filters, is there a solution for this dog chasing its tail?
I have a big list of opt-in numbers.
Some of them are bogus or fake.
I need to write a small app that does the following:-
Read numbers from an excel file
Call each number: if the call gets through (the phone rings or is busy/engaged), we mark the number as valid in a new column in the excel sheet. If the number is invalid, we mark the number as invalid.
Is it possible to achieve this in Android?
Can we get the response status while making a call from the app?
Example: Status=Ringing, Status=Busy/Engaged, Status=Invalid etc
Is there a better way of finding if a phone number is valid or invalid?
You can't. You are unable to call any phone number other way than firing out an intent to invoke device's Phone app do the job, therefore full and smooth automation is hardly possible. You may try to do that and at the same time set up own listener to know if the call succeeded or not, but that's far from what you wanted.
You cannot do it in Android but you can develop it in a cloud-based IVR system using Call Control XML (CCXML) and a platform that has good call progress analysis, like Voxeo. Take a look at this Answer which provides more detail. Be careful with this type of solution as there are laws which govern automatic notification. Make sure people opt in for this type of notification/verification.
so i was wondering if its possible to for an application that i would write to be constantly running in the background and alter regular phone operations. For example this could be something like as soon as you receive a text from anyone you forward it automatically to another number. Is something like this at all possible?
Just to be clear I don't want to solve that particular problem through some other means, just want to know if apps can accomplish that.
Also if that is possible is it possible for an app that i write to alter more immediate and instant things, like an incoming call.
thanks all for reading this, and hopefully a helpful response :)
It depends on how far you want to go, but I would expect that what you want to achieve probably isn't possible.
The Android OS does reserve some actions and prevent them from being doing programmatically. For example, you can display the Dialer with a number filled in but the user has to press the call button to make a call. Similarly, you can display the SMS app with a message already written but it is up to the user to send the message.
I don't know for sure, but I assume this is for security. For example, let's imagine you could write an application which could start a call with no user interaction. I would release my Super-Handy-Dialer application which makes quick calls for you making you life easier, but what it also would do is wait until 2am and call my premium rate phone line every night for 3 hours.