[Q] Overriding Android default (built-in) components - Android Software/Hacking General [Developers Only]

I want an activity in an app to overide the Android default (built-in) phone dialer/receiver that normally gets run on incoming calls. This is so that I can replace the default screen, the one that pops up when a phone call comes in, with my own call reception activity.
What approaches would you suggest for this. How do you control the priority / precedence of components to be called? What is the Android component that does the phone call receiving, and how do I run my own activity BEFORE this starts up (and instead of it).
Do you know whether this kind of thing (overriding built-in components) can be done without modifying the Android Java source code (of the dialer/receiver I assume)? Or in some other way?
Would you please point me to any information (links, books, code
examples, whatever), you may have about this? Any starting point would be helpful.
Thanks,
Rooster

Related

[Q] Accessing call stream - How to? / Is it possible?

Hi all,
The effect I'm looking for:
While an open phone call, I'd like to be able to play sounds into the call stream so that (similiarly to the in-call DTMF tones) the sounds would be heard by the other party.
My questions:
1) Is this possible without modifying phone.apk (or what ever system .apk needed to gain access to the call stream)? Does it help if the device is rooted?
2) If not, is it at all possible? What would it take to achieve such an effect?
Any help would be much appreciated.
Need a solution too, looking into reflection.
This is rather old but I was wondering if there's any news? I searched for anything related to call, stream, DTMF etc. in XDA and everywhere else I could think of.
So far I found nothing. Is there really no way to send tones up the call stream?
I'm looking into the source code to see whether I can use some reflection, even just to see if it works. The best bet seems like CallManager..
It has 'SendDtmf' and 'StartDtmf' that automatically goes to the active call, gets the active phone from it and shoots up the tones.
HOWEVER I got stuck. Both methods keep returning false. Digging into it you see that both methods check whether there are any active calls before sending anything. So I tested it myself and here lies the issue - 'HasActiveFGCalls' (and HasActiveBgCalls too) returns false no matter what.
In fact, getting the full call list (getForegroundCalls) always gives me an empty list.
I tested it on my phone (SGS, CM7) and on the emulator on several versions. Same results - always no active calls regardless of whether the phone is in a call or not.
I'm at a loss here. Seems like this is as far as I can go with my knowledge at the moment.
So... anyone has any clue regarding this?

[Q] Record input and output audio during a call?

I'm looking to hack myself together a call recorder for Android which will work better than all of the other solutions in the market. I've tried them all, and they all surprisingly don't work for me on my Nexus One. I'm going to essentially start an open source fork so I can simply record the input and output of calls (effectively recording the whole call as-is) and I'll probably submit it to Cyanogenmod upstream so they can choose to include it or not.
I was told to essentially look into the Dialer app and modify stuff there to get access to recording things, but I'm looking through the Git branch right now and not seeing anything important. Does anyone know how I could make this happen? Is there a way I could simply expose a device like in linux and simply `cat /dev/phone_audio` to a file? If I can simply record PCM from a phone call, I'd be golden. I don't really care what avenue I have to take to make this work, whatever it takes works for me. Can anyone recommend where to start? Where can I get access to the telephony stack and the two streams (audio/mic in, audio/speaker out)?
how about starting here...
http://forum.xda-developers.com/showthread.php?p=11304620
or
http://forum.xda-developers.com/showthread.php?t=967297
I have an infuse and I would pay for this ability. Hopefully someone can get it working, but I think that it would have to be done on a phone by phone basis. It looks like the file that would control this is /system/lib/libaudiopolicy.so
Good luck!

[Q] Android Control System

Heya guys,
I have a project I wish to start with. I have a old HTC TyTn II and HTC Touch Pro II available, but thinking of using the HTC Touch Pro II as its the better phone.
I wish to make use of all the phone's functionality (GPS, BT, SMS, etc) to gather information to do certain tasks with them. I first wanted to pass everything down to a PC, but from what I heard about Android, I can prob use the phone as the computer and do everything from there.
I wish to install the phone into my car and program it as a security system. (Experimental)
Some of the things I am looking for the system to do are:
When the Car Phone detects my Real Phone, it should auto disarm, sending a command via Bluetooth to a relay to Disable Fuel Cutoff.
If the car moves (GPS) and wasn't disarmed, the phone should send out a text, notifying me of potential theft.
A web server could also be great with a corn job that will update a simple txt file with GPS co-ords, as to follow the car. Maybe use it as a remote interface later.
The script should respond to text messages or some network interface (Internet would be cool) so I can control it from a distance...
I believe this gives you an indication of the direction I wish to move in. I haven't played with Android source yet, but I know its Linux. What is the possibility of removing "Android" and keeping the drivers so that I can write my own custom script to just run in the background.
If there are better ways, please let me know. I'm still looking for possible options.
There is a Android version out for the HTC Touch Pro II that seems to work great! If recommended, I would prob try to start from it.
Thanks
Xethron

Change default dialer from console/script

Hi,
I'm using a Galaxy S2, and I would like to know if it is possible (and if so: how) to change the default dialer.
I have multiple dialers (VOIP, skype, ...), and everytime i want to dial, I want to select which one to use ... Except when I'm in the car, I want to use the normal dialer (otherwise I would have to take the phone out of my pants to select the dialer).
I'm fairly experienced with Tasker, so the correct contexts are loaded. I only need to know how I can change the default dialer within 1 context.
Anyone can help ?
Gr,
Deva
Anyone ?
nobody ?
devastator83 said:
Hi,
I'm using a Galaxy S2, and I would like to know if it is possible (and if so: how) to change the default dialer.
I have multiple dialers (VOIP, skype, ...), and everytime i want to dial, I want to select which one to use ... Except when I'm in the car, I want to use the normal dialer (otherwise I would have to take the phone out of my pants to select the dialer).
I'm fairly experienced with Tasker, so the correct contexts are loaded. I only need to know how I can change the default dialer within 1 context.
Anyone can help ?
Gr,
Deva
Click to expand...
Click to collapse
Hello Deva,
I was actually looking for that. Here is what I did so far, but with no eventual success because of my need to kill default dialer.
I found out on XDA that no application will allow you to change the default application for security reasons. Android does not want any application to hijack your phone by assigning itself as a default application without your approval, or so I heard.
I wanted the voip dialer to be used in morning and the stock dialer in the evening, because of my limited daytime minutes. So I decided to use a different method. I have two dialing programs, the android stock one and a voip dialer. Using Tasker and Secure Settings (paid) I created a profile to kill the unwanted dialer during the time of the day.
Theoretically it should work fine, but when I put to practice, it did not function as I expected. I discovered that killing the default dialer in the morning actually prevented me from receiving phone calls, so I would see the calls received but instantly get rejected. It was fine at the evening though because killing/freezing the voip dialer has no harmful effect.
So the best you can achieve if you are suing this method is to create a task to freeze all other dialers but the default/stock one while you are in the car and then unfreeze them when you are not.
You post was in September 2011. If you find a solution prior to my post, please let me know: I am still looking for a solution for my case.

Very Old + Blind relative - need remote control software to have calls with them.

Hi,
I have a relative well over 90, almost fully blind so can not see icons on screens but could about locate the phone. Currently spending a fortune on traditional calls and would like to be able to communicate via mobile. WiFi / internet access can be installed at very low cost. I am able to visit very, very infrequently so the software needs to be persistent and survive ROM updates etc.
Ideal Requirements:
1. When I am (and perhaps a few other preset users) calling on Viber or Whatsup any touch whatsoever answers. May be even auto answer.
2. Any other calls via whatever channels create no disturbance.
3. I am able to log in remotely to update device etc with no assistance whatsoever from the user. This functionality survives software updates bu the manufacturer.
4. If the user touches the phone it initiates viber/whatsup call to me and records what is happening and send it to me if I can not answer.
5. It has to be secure so remote access should be via encryption keys only to us and not the app service provider (I.e. akin to end to end encryption on viber/whatsup)
6. The app understands that the end user might be touching the phone in many different way and hence not respond to that during the call and say or 30 seconds after the call.
Realizing that chances are that there are no apps to satisfy those requirements. as a minimum:
Remote access and control software for the android such that:
1. I can start a whats up or Viber call from my mobile, then easily and quickly remotely "pick up" the recipient phone so that they do not have to do anything. This way the call between us could be started.
2. I can remotely log in, perhaps from PC for installing updates etc.
3. Persistent with regard to over the air android updates requiring no cooperation from the remote end user once set up.
4. It has to be secure so remote access should be via encryption keys only to us and not the app service provider (I.e. akin to end to end encryption on viber/whatsup)
(I understand that Skype has some auto answer features but would prefer viber / whatsup due to end to end encryption and better quality)
Also advice on handset also appreciated (loud clear voice and ability to have remote control software and viber / whatsup is a priority - no point in paying for 40MP camera or Virtual Reality capable CPU)
Advance thanks for any advice!
Life sucks. And changes suck. And I can image that when being old they suck even more.
Have to just suggest that you don't make any changes into her/his life.
As long as s/he is happy comfortable enough the way things are now...
CXZa said:
Life sucks. And changes suck. And I can image that when being old they suck even more.
Have to just suggest that you don't make any changes into her/his life.
As long as s/he is happy comfortable enough the way things are now...
Click to expand...
Click to collapse
She is not happy with the way things are because:
1. Calls cost up to $100 per month.
2. She actually wants a mobile because everyone else has ... even though she would not be bale to use one.
I can see no reason why there should not be a software that would enable even people in her conditions to have some very limited use of a smart phone - for example as described above.

Categories

Resources