I am writing a small call recording library for my root phone.
In some applications, I saw that recording is done through ALSA or CAF on root phones.
I could not find a single example / tutorial on how to use ALSA or CAF to record calls (or even to record sound, for that matter).
I saw the tinyAlsa lib project, but I could not figure out how to use it in an Android application. Can someone please show me some tutorial or sample code on how to integrate ALSA or CAF into an Android app?
Update I managed to wrap tinyAlsa with JNI calls. However, calls like mixer_open (0) return null pointers, and calls like pcm_open (...) return a pointer, but a subsequent call to is_pcm_ready (pcm) always returns false.
Am I doing something wrong? Did I miss something?
source share