I've received a bug report from an user of my app. She said that after downloaded my app and used it, the speaker of the mobile phone didn't emit any sound anymore, even after deleting the app. She solved the problem only after restarting the device in safe mode.
Is it really possible that my app caused this? Have you heard about similar cases?
The app is an audio player for an audio codec not supported by Android versions previous to 5.0.
I've used the AudioTrack class for playing the audio and a custom decoder made with the Java Native Interface and a third part library written in C.
The device is a Galaxy A3 (2017) with Android 7.0.
I've updated the app some months ago, substituting the old deprecated AudioTrack constructor with the new one that make use of the AudioTrack.Builder. I haven't received new similar report, so maybe the problem is solved.
Related
I want to develop a feature for an android app so that when there is a call we can play an audio file on a call. This audio file should be played when the mic is muted. In other words, the other side of the call will just hear the audio file nothing else.I want to run this app on an Samsung A52 rooted device.
Many people said that for this feature I need to create a custom android firmware. In other words I need kernel development. I was sure about it until my client said that hey have a 3rd party lib which is implemented this feature without kernel development. I was disappointed until I saw this post related to achieve this feature through running some commands on a rooted android. The post was talking about injecting uplink audio in a call.
The devices I wanted to run the app on them have Qualcomm-based chipsets. Does anyone have an experience related to this topic?
According to the linked post I guess it's possible through running some commands on a shell of a rooted device but I don't know which commands I should use.
I am recording audio for voice messages in the app using the following code.
MediaRecorder audioRecorder = new MediaRecorder();
audioRecorder.setAudioSource(MediaRecorder.AudioSource.VOICE_COMMUNICATION);
audioRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
audioRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.HE_AAC);
audioRecorder.setOutputFile(audioRecordingFile);
audioRecorder.prepare();
audioRecorder.start();
Use of MediaRecorder.AudioSource.VOICE_COMMUNICATION instead of MediaRecorder.AudioSource.MIC) is very helpful in recording pre-processed clean audios.
But, recently I found some issues in which the recorded files are empty are being reported on a few devices which were recently updated to Android 10. It should be noted that not all Android 10 devices have these issues, only a few i.e Nokia 6.1 and Mi A2.
There is no error or exception but just empty audio output files.
If I use MediaRecorder.AudioSource.MIC) then the issue is not seen.
I found the following information related to Android 10 and VOICE_COMMUNICATION
The Android 10 release includes the following requirements for capture with VOICE_COMMUNICATION.
Based on this I checked the availability of AcousticEchoCanceler,AutomaticGainControl and NoiseSuppressor using the following code.
AcousticEchoCanceler.isAvailable()
AutomaticGainControl.isAvailable()
NoiseSuppressor.isAvailable()
And found the same result on Mi A2 and OnePlus 6 with Android 10. Both of the devices show AcousticEchoCanceler and NoiseSuppressor as available and AutomaticGainControl as not available.
Since the issue is not present on all Android devices, I don`t want to fall back on using MediaRecorder.AudioSource.MIC). At the same time, there is no error, exception or differentiating factor which tells me when to fall back on MediaRecorder.AudioSource.MIC).
UPDATE: The issue gets resolved when Google Assistant is turned off on Mi A2.
This might be the pointer : https://developer.android.com/guide/topics/media/sharing-audio-input
Any help regarding this is appreciated.
I ended up using MediaRecorder.AudioSource.VOICE_RECOGNITION instead of MediaRecorder.AudioSource.VOICE_COMMUNICATION on all android versions.
We ended up taking samples on 15+ different devices and found out that MediaRecorder.AudioSource.VOICE_RECOGNITION works best with the majority devices including high-end and mid-range phones.
As per my understanding, the original issue faced on few devices on some devices seems like implementation issues by the OEMs with respect to Android 10 and VOICE_COMMUNICATION https://source.android.com/devices/audio/implement-pre-processing
I was working on call recording with nougat but since oréo, it's not working anymore.
I am using MediaRecorder for recording.It is working on other versions of android.
I've tried many others, but no success.
so i need to know if someone has been successful made this type of application with Oreo, if so, how to do this?
Call recording is not allowed from Android 6 Marshmallow.
There was a workaround in native code around the root requirement, which worked until Android 8.1.
This was patched in Android 9 Pie, and since this version recording calls is not possible anymore. You can find a detailed explanation from the developer of ACR (the most popular call recorder for Android) here.
For the Android 6-7-8 workaround, you can check an example implementation here (it basically uses native C++ code to bypass the check done in Java).
I want to use an audio capture feature at my app. I followed this link at developer.android.com.
I'm using Android Studio 1.4 and a Nexus 5 with Api21 as virtual device. At developer.android it is descripted that it's not possible to use the audio capture feature with an simulator:
Note: The Android Emulator does not have the ability to capture audio, but actual devices are likely to provide these capabilities.
But is this an information that is up to date? I'm able to use the record button but the activity crashes after pressing stop. I can see the audiorecordtest.3gp file on the simulated device and if I save it to my computer I can play my recorded audio. The crash comes without any shown exception. If I ask for
context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_MICROPHONE);
I got back a true. It seems like the simulator is able to capture audio but can't handle correctly the stopping of it? Is there a way to get around?
One aspect of Tamper Checking involves testing for an Emulator running your app...
In THIS article (Paragraph 4.1), Emulator detection is described... The tests detect many emulators, but throw some "false positives", depending on the device.
False positives render some emulator test's, described in the article, not appropriate for production, but are fine in a test environment where you know your devices and their test responses.
I am currently developing a mobile application that is all about very short sound recordings and for the time sake I decided to build it with Cordova (not Phonegap). Unfortunately today I have been fighting with the actual sound recording on my Nexus 5.
I am using the Cordova media-capture plugin, The code currently running is exactly the code from their documentation.
On older device, everything runs great. On my Nexus 5 though, when I click on button to record audio, it just returns error code number 3 (No media files recorded) even without opening the audio recorder. I thought it might be problem with new Android, but on simulator it runs fine. I also thought that somehow it could be connected to that I cannot find any audio recording app on my device, so I installed one and still nothing.
Then I thought maybe I am doing something wrong, so I installed this app: https://github.com/Icenium/sample-capture and the same problem.
There has been some advice around here to update the Capture Java file, which I did and still didn't help. What can I try next?
This is because there is no application installed, by default, to handle the intent (as explained above by others).
Try installing an application that handles that intent. For example I used this one:
https://play.google.com/store/apps/details?id=com.brightattic.soundrecorder&hl=en
(Please note I offer no endorsement of the app other than it worked to prove that the problem was a lack of sound recorder app).
Maybe try to set the targetsdk to 18 instead of 19 in androidmanifest.xml (and of course be sure to have installed api 18 in android sdk manager).
This should force the new kitkat chrome webview to operate in quirk mode and behave like the webview in jellybean.
I had the same issue, running adb logcat is useful:
W/System.err(22102): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.provider.MediaStore.RECORD_SOUND }
...
D/CordovaLog(22102): file:///android_asset/www/js/index.js: Line 77 : Capture ERROR: {"message":"Canceled.","code":3}
For me the problem is that Nexus 5 (android 4.4.2) doesn't handle the Intent, i.e. doesn't seem to have a default audio recorder.
On devices which do have a default audio recorder, you might see this error if that application doesn't include a receiver for RECORD_SOUND..