Comments (2)
After making the following modifications, I can now open it
// val rates = audioCapabilities.supportedSampleRates
// if (rates != null && rates.isNotEmpty()) {
// val ratesUnsigned = rates.toUIntArray()
// val default = DiscreteSampleRateInfo.toNearest(ratesUnsigned, tryDefault)!!
//
// return DiscreteSampleRateInfo(ratesUnsigned, default)
@SuppressLint("SoonBlockedPrivateApi")
val SAMPLE_RATE_HZ_MIN_COMPAT: Int = 4000
@SuppressLint("SoonBlockedPrivateApi")
val SAMPLE_RATE_HZ_MAX_COMPAT: Int = 48000
Where are the codes to start and end recording? I want to use it to record WeChat calls. Is this feasible?
from bcr.
Caused by: java.lang.NullPointerException: Attempt to get length of null array
at android.media.MediaCodecInfo$AudioCapabilities.getSupportedSampleRates(MediaCodecInfo.java:973)
That's unfortunate. Seems like a bug in MIUI if it's crashing within the Android framework.
Where are the codes to start and end recording? I want to use it to record WeChat calls. Is this feasible?
The recording process for a single call is handled by RecorderThread
. When the thread starts, the recording starts. When the thread is cancelled, the recording stops.
The thread is created from RecorderInCallService
. It registers a callback with Android's telephony framework so that it is notified when the call state changes (onCallAdded()
/onCallRemoved()
/onStateChanged()
/onDetailsChanged()
).
If you want to modify the code to record third party apps, it'll likely take a significant amount of work. At the very least, RecorderInCallService
would have to be replaced with custom call detection logic because Android doesn't really have an API to detect VOIP calls in third party apps. I'm guessing you'd probably need to use the accessibility API to determine when WeChat's calls begin and end.
RecorderThread
would probably also need to be updated to point to whichever audio stream WeChat uses (phone calls use MediaRecorder.AudioSource.VOICE_CALL
, but third party VOIP calls likely use something different).
from bcr.
Related Issues (20)
- unable to change output directory HOT 2
- I don't want see the log.txt file. HOT 6
- Does not record unconnected calls / voicemail HOT 2
- Recorded audio changes in volume depending on how loud I have my volume set during the call HOT 1
- [Question] call recording announcement - all / both parties HOT 6
- Install on Sony Xperia XZ2 Compact running LineageOS 21 fails HOT 8
- Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{63426e1 u0 com.chiller3.bcr/.DirectBootMigrationService c:com.chiller3.bcr} HOT 2
- Only the other party's voice is being recorded. HOT 1
- Migrating recordings after every boot. HOT 1
- Allow pure silence warning notifications to be disabled HOT 2
- Cannot build project using Android Studio HOT 1
- 新版本bug HOT 1
- 1.69 bug HOT 12
- BUG: BCR forces save files into Android/data/com.chiller3.bcr/files despite the settings HOT 1
- Protection of BCR if Magisk looses root (during call recording) HOT 4
- App crashing HOT 2
- Some recordings only contain my voice - the other side is not recorded HOT 2
- VOIP call recordings HOT 2
- Using BCR with Shizuku HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bcr.