Open skr4n opened 1 month ago
Thanks for the report!
This is a bit silly but if you have a crash it won't be in the radio log, you'll also need to get a regular adb logcat
-- we'll probably need to look at -b radio
as well to check what went wrong with the parsing but having both would be super helpful.
Note the parsing for calls is pretty hard-coded (I still haven't taken time to fix it for my own provider...), so any refactoring there will probably help with crashes
Sorry, I just realized that!
Here is the output of adb logcat -b crash
: crash.log
This comes despite having manually allowed all permissions (including Mic and Phone) in app settings.
Thanks!
startRecording() called on an uninitialized AudioRecord
could be a permission problem (it's the first thing that pops up when searching for this message), but it could apparently be anything else that made the AudioRecord() call fail (e.g. frequency or something not supported on this device)... It's probably possible to check if the call worked or not but I don't know if we can get it to spill out why (maybe in a debug logcat?)
I'm not too familiar with this but hopefully @phhusson will know better.
In SipHandler.kt,
val audioRecord = AudioRecord(MediaRecorder.AudioSource.VOICE_COMMUNICATION, 8000, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT, minBufferSize)
Replacing VOICE_COMMUNICATION
with VOICE_CALL
(along with adding the necessary permission in manifest) does fix the crash and the call goes through.
@skr4n sorry if it sounds stupid, but did you check that the app has the right to use the microphone in the settings?
Yes, I have manually enabled the Microphone permission in the app settings and set it to "Allow only while using the app" since before posting the issue.
Might be worth trying to allow not just while using the app? If the call does go through the ims framework, the app in use won't be ims but Phone or whatever you're dialing from, so I'm not sure android will consider phhims to be "in use"
Yeah I agree with @martinetd but I've seen cases where Android doesn't let the user do that -_-' I'll dig at how we're supposed to do that and why does it work in some cases and some not...
The available options were "Allow only while in use", "Ask every time" and "Don't allow" for Microphone. Besides, there is a "Phone" permission, which was set to "Allow" by default and greyed out with the text "Device requires this permission to operate". I had also ensured that the Battery Optimization is disabled (set to "Unoptimized") for Ims throughout my testing. So far I have seen the option "Allow all the time" only for the Location permission in a few apps... not sure if Microphone permission has an equivalent.
Greetings! I have built the apk and installed it on a Galaxy M21 (Exynos 9611) from source as per README and #16. It is running LineageOS 21 GSI Feb build. The carrier is Airtel India. Network type has been set to "LTE only" via
*#*#4636#*#*
in an attempt to force the usage of VoLTE as otherwise, the phone simply resorts to making 2G calls. WiFi is enabled.Issue:
After setting up the Ims apk as instructed, initiating a call does ring the receiver's end, but upon accepting the call, the caller's end drops the call with a popup "Ims has stopped working", indicating a crash. The call stays on the other end with silence. Receiving a call does the same, clicking "Answer" results in an immediate call drop with the popup "Ims has stopped working", the call stays on the other end with silence.
I have collected the log using
adb logcat -b radio
. Log: log.txt Crash Log: crash.txtThank you for your work.