Calling android libraries native code - Android Software Development

I have a problem with every voip app on my android phone(Samsung
i5700). Every time I call with voip app and the app try to route sound
to Earpiece_incall seems that some error happens with
AudioPolicyManager and it redirect sound to speaker instead Earpiece.
I was thinking about coding a C code, calling audio libraries directly
and forcing using earpiece. Could be this possible? I'm a bit lost in
this topic and I need some tips.
Thank in advanced

Related

Record uplink/downlink speech streams? (WaveIn, TAPI, RIL?)

Hi,
I'm trying to record both uplink and downlink speech streams of my XDA II during a phone call.
I tried many different things but couldn't get working any of them:
- I first tried the waveIn/waveOut API and thought, in the first place, that I was able to record the incoming and outgoing audio streams, mixed together. But I quickly realise that what I was recording was only the sound from the mike, and that the speech of the downlink speech was going from the speaker through the air to the mike. So I was recording my own voice (from the mike) and the voice of the other part (from the mike too as the sound was going from the speaker to the mike).
- Then I had a look to the TAPI API. I was able to answer calls but it was impossible for me to access to any of the audio streams. I think it's a limitation of the device, and that the TAPI API hasn't been fully implemented on the XDA2. But I can't be sure of that.
- Now I'm trying to use RIL, which seems to be a layer below the other APIs. I believe it might be possible to access to the audio streams, but I have no idea how.
- I also think that the audio data of both streams must be stored in the memory, somewhere in the device. But where?
Any ideas or suggestions on this? Do you think I should keep investigating RIL?
Thanks a lot
Ben
There is 3rd party software that will do this.
cruisin-thru said:
There is 3rd party software that will do this.
Click to expand...
Click to collapse
...which one is it please?
THANX
buzz
Re: Record uplink/downlink speech streams? (WaveIn, TAPI, RI
there is no such a program. The only thing yor program can record is the sound from microphone. This can be tested by connecting a headset to the device and trying to record anything during call. Only ugly devices like Anextek SP230 can record both sides because microphone is wired to the speaker.
You cannot use RIL or TAPI to record calls. It is a limitation of both hardware and OS. Maybe WM2005 would support this.
Yes I don't thinck there is such a program (I've been looking for such a program for the past 2 weeks). All recording softwares you can find don't do much more than using the waveIn/waveOut API and so they record only the sound from the microphone.
Mamaich: Would the Anextek SP230 allow me to record properly both sides even if I use a headset while recording? How come the microphone is wired to the speaker? Does that mean that the sound going to the speaker goes also to the microphone? Wouldn't that introduce a lot of echo in the network during phone calls?
Even if we are limited by the OS there must be a way of getting the speech, because somehow the audio data must be stored somewhere in the device (either the GSM memory or the device memory). And that's what I would like to find out.
Thanks.
serbenet said:
Would the Anextek SP230 allow me to record properly both sides even if I use a headset while recording?
Click to expand...
Click to collapse
Yes. I owned Rover S1 which is based on Anextek and checked this.
How come the microphone is wired to the speaker? Does that mean that the sound going to the speaker goes also to the microphone? Wouldn't that introduce a lot of echo in the network during phone calls?
Click to expand...
Click to collapse
There is no echo during phone calls, but when using VoIP and similar programs the echo is terrible.
Even if we are limited by the OS there must be a way of getting the speech, because somehow the audio data must be stored somewhere in the device (either the GSM memory or the device memory).
Click to expand...
Click to collapse
Call is processed by the GSM module that has its own CPU (some sort of ARM with DSP extensions). You may reverse engeneer its firmware, but it is very complex. On XDAs its OS is based on "Nucleus PLUS - Version 1.0.G1.1" by ATI. In Anextek it is Siemens MC45 module.
Well all the people that claim that Vito sound software and others record both sides of conversation on the forum are lying?
Also it seems this article must be untrue
http://asia.internet.com/news/article.php/1383691
It says that 2 way recording is possible on the xda.
excerpt: Designed for busy people on the move, the device combines a color personal digital assistant (PDA) and General Packet Radio Services (GPRS) handset into one compact unit. Among the things that the users are able to do with the unit include recording a two-way phone conversation or a 'live' conversation, listening to music, watching video clips and reading e-books.
I have now tried vito sound recorder 2005 and it doesnt allow both sides of conversation to be recorded on my xda, I took a look around and it seems the old siemens sx45 had the capability with its recorder software, here is an excerpt.
The sound recorder lets you record from the built in microphone or for ultimate fun, both sides of a phone conversation, which can be played back whilst in conversation. Confuses the hell out of folks when they hear what they’ve just said.
In a sens they are not really lying because you can record both sides of conversation, if you allow the sound from the speaker to go to the microphone. If you don't use a headset and the volume of your speaker is high enough, that will be the case. The voice of the other part will go through the air before being recorded. That's why people claim that you can record both sides of conversation even though the quality of your recording is rubbish.
With vito you get perfect reproduction of the caller but zero from yourself.

audio to internal speaker

Has anyone had any experience here writing code to take advantage of the internal speaker on our phone devices?
I know the external speaker is a standard peice of WM hardware, but there must be a way to call the internal speaker as well... this would be very useful for coding VOIP apps, as you can imagine.
Any thoughts?
Apparently the elusive Cicero networks product "Cicerophone" handled VOiP calls using the internal speaker!
This is something that other developing apps, such as Skype for WM, have failed to figure out so far.
Unfortunately, Cicero is very secretive, and as of yet no one else seems to know how to achieve this.
Anyone here know anything?
Which one is the internal speaker?
I think I wrote some audio routing code for this once...
V
By "internal" I mean the handset speaker usually reserved only for phone calls.
Windows Mobile devices have always had an audio speaker which is easily accessible to developers as a standard audio device. However, phone devices have a SECOND speaker, one that is smaller and not as amplified, which is used to listen to phone conversations when the device is held up to your head. This smaller speaker is what I've seen called the "internal", although I admit that it may not be the correct term for it.
I'm asking because I would actually like to route audio to that speaker for certain applications, especially VoIP, which until now has been going to loudspeaker (which causes audio feedback and privacy issues).
Do you have experience with this sort of thing?
Devices from Eten, e.g. X500, M700 have a skype service programe that redirect vioces from speaker to earphone. I don't know how it works but i just made a test to trick the service and direct the sound to earphone when making VOIP calls.
Dishe said:
Apparently the elusive Cicero networks product "Cicerophone" handled VOiP calls using the internal speaker!
Click to expand...
Click to collapse
Hi! Where can i buy/download cicerophone ?
Partially Solved!!!!!!!!!!!!!!!!!!!!!
I apologize for cross posting, but if you use the provided wired headset, everything is OK and voip (i.e.: Fring, etc) runs great, no echo e no voice feedback.
TRY IT!!!!!!!
I thought we all knew that already...
I've been using a BT headset and the BTAudio app to reroute all sound input/output to the headset. Problem is, you have to initialize it every time you want to make/receive a VOIP call, otherwise it will eat your battery very quickly since it keeps a constant audio channel live to your headset, even when there is no sound currently being played.
The problem is, when I leave voip on and slip the phone in my pocket, I'm not always using my wired headset and/or BT headset when the phone rings, and its silly that I can't use hardware that's sitting on my device in my hands.
Hi ,
I searched and couldn't find cicerophone anywehere .
do u know by any chance where we can download or buy it ?
tnx
no, its not for sale.
It was developed to sell to a telecom, and they are still trying to sell the technology. There never was a consumer edition of the software, only beta and evaluation versions that some people were fortunate enough to get their hands on for review purposes. They have done a very good job of keeping a VERY tight lid on this- its not available ANYWHERE, and they don't have any plan of making it available to the general public.
This tree has been barked up many times, its a lost cause.
Maybe some guy can have a look at the SkypeSettings.exe and SkypeSettings.dll files from Eten.
From what I saw, it only deals with the WAV1: device. No more devices are listed. Probably it captures the audio from it and than sends it to front speaker.
It does not run on my PDA. The settings tab also appears grayed out, so the app know it is not an Eten.
Unfortunately I could not debug the file on my device, given that IDA does not work on WM6, but probably both files have a check for Eten device, and if it is of a different brand the apps terminate.

Can someone please test skvalex's call recorder?

I'm very interested in grabbing this phone but apparently it's no longer a dev edition so if you unlock the boot loader you can't return it. Can someone test Skvalex's Call Recorder for me before I buy it?
Trial of app is here: http://forum.xda-developers.com/attachment.php?attachmentid=3492762&d=1443730003
If you can test recording both incoming and outgoing that'd be awesome. I greatly appreciate the help!
Heyo, it works a treat
but it didnt work for me i set auto call recording, and it recorded nothing
spazzwig thanks! When your post says "phone mic" that doesn't mean it's recording the other side from its own mic right? (Recording speakerphone kind of thing)
Aftab_khatri are you rooted?
Thanks
yep rooted and xposed.
Aftab interesting. Well it works for spazzwig so I'll get the phone and give it a shot
Thank you both for all the help
Aftab, did you install/setup ALSA?
My previous phones worked with the standard api method, but the Call Recorder settings profile for MXPE specifies ALSA which is a separate install that requires root as well. Since I set that up recording is working flawlessly. The fact that there is a settings profile for MXPE indicates Skvalex is probably confident in the support as well.
FBIR correct, the other side is recorded internally, not like many of the non-root recorders that do the faint mic/speakerphone thing. Both sides have been recording as loud and clear as the call itself. I just meant I haven't tried recording over wired or bluetooth headset, speakerphone, etc -- only standard "phone-to-ear" calls. Just note the above regarding the additional ALSA install.
Spazzwig awesome! Thanks so much for the details. I'm not too concerned about Bluetooth or other headsets so if they work, that's just a bonus. I guess it's time to order the phone
spazzwig said:
Aftab, did you install/setup ALSA?
My previous phones worked with the standard api method, but the Call Recorder settings profile for MXPE specifies ALSA which is a separate install that requires root as well. Since I set that up recording is working flawlessly. The fact that there is a settings profile for MXPE indicates Skvalex is probably confident in the support as well.
FBIR correct, the other side is recorded internally, not like many of the non-root recorders that do the faint mic/speakerphone thing. Both sides have been recording as loud and clear as the call itself. I just meant I haven't tried recording over wired or bluetooth headset, speakerphone, etc -- only standard "phone-to-ear" calls. Just note the above regarding the additional ALSA install.
Click to expand...
Click to collapse
No mate, what is ALSA ?
i just installed gave root permission setup settings and reboot and made few calls didnt work for me later i uninstalled from playstore to get money back
Alsa is a free app from the same developer that adds some audio drivers and a mixer
https://play.google.com/store/apps/details?id=com.skvalex.alsamixer&hl=en

microphone issue

The microphone only works with phone calls. WhatsApp voice messages, Google commands, any other app does not work. A complete reset didn't help either. Looks like a software bug. Otherwise, the microphone would not work on phone calls.
Newest Android version with latest November patch.
Any ideas?
I have the same mic problem.
Did you open a support case?
I was able to recreate the error using a recorder app. Whenever the microphone is set to mono, recording is no longer possible. Once the recording is set to stereo, the microphone will work fine. WhatsApp, Google commands seem to use the mono setting and do not work. Is there a setting that can permanently set the microphone to stereo?
I talked to support today. The problem is the last update. After that, all apps except the phone app use the rear microphone. I asked for a fix and waiting for an answer.

mono microphone issue

The microphone only works with phone calls. WhatsApp voice messages, Google commands, any other app does not work. A complete reset didn't help either. Looks like a software bug. Otherwise, the microphone would not work on phone calls.
I was able to recreate the error using a recorder app. Whenever the microphone is set to mono, recording is no longer possible. Once the recording is set to stereo, the microphone will work fine. WhatsApp, Google commands seem to use the mono setting and do not work. Is there an app that can permanently set the microphone to stereo?
Newest Android version with latest November patch.
Any ideas?
Mine works but sounds horrible.
Sent from my PH-1 using XDA Labs

Categories

Resources