audio record lib for android 6+

ilan

Expert
Licensed User
Longtime User
hi

i am using audio record lib from @stevel05 for my Call Recorder App.
With Android less then 6.0 everything worked great but on android 6.0 the recorder is not intialized
when i use audio source = 4 (voice call)

i also tried audio recorder lib from @Erel that also worked on android less then 6 but on android 6 the recorder will not intialize when the source is 4.

when i set the audio source to 1 (that is the mic) the recorder will be intilized and also records but on 4 it wont.

@stevel05 said that he will take a look at it and he said that there where some changes on android 6 but with javaobject it should be able to run it. unfortunately he has no android 6 device (see this: https://www.b4x.com/android/forum/threads/audiorecord-library.13993/page-7#post-426406)

however i dont know how to do it and i am ready to pay for someone that only need to make it possible to run it on android 6 (with java object or any other solution)

i will start with a 50$ fee for that job.

thanx, ilan :)
 

ilan

Expert
Licensed User
Longtime User
thank you @Erel for replying. what i have seen is that the information above is a general information and not related to android 6

vc.jpg


the voice call recording was added in Api level 4 (android 1.6) and maybe at that time it was only for system components available but my call recorder did worked on android 4,5. so i think this information is not correct or old.

i have downloaded some other CR apps from the store. 1 asked for permissions on start to record audio,... and i allowed and the recording did worked!

https://play.google.com/store/apps/details?id=com.nll.acr&hl=en

i tried 2 other CR and 1 recorded only me (mic) and the other did not record anything.

so there need to be a way to make it work since some CR are recording voice calls.
 

ilan

Expert
Licensed User
Longtime User
could it be that with b4a 6 where there will be the permission manager i could ask for that permission and then the Audio Lib could be intialized?

now the problem is that with audio source 4 it wont intialize but with audio source 1 it will. so maybe on android 6+ you MUST ask for that permission and
set targetsdk to 23+ ? what do you think erel?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User

ilan

Expert
Licensed User
Longtime User

sorry erel, dont understand me wrong (i don't argue with you :)) on the link you posted it does not say that audio source 4 is working only on system apps (like the link you posted in post #2).

and also the app ACR (https://play.google.com/store/apps/details?id=com.nll.acr&hl=en) is working on my android 6.01 galaxsy s5

so there need to be a way to record calls. i did this app for a client if no call recorder is working on android 6 i wont have any problem with that but he tried some other recorder
that did worked on android 6 and i also tested some and 1 did recorded on android 6 so i cannot tell him that call recording is not working on android 6.

what do you think erel? is there any way to make it work?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
sorry erel, dont understand me wrong (i don't argue with you :))
Don't be sorry, feel free to argue. I'm actually not sure whether it is possible or not.

The fact that the older version of the documentation doesn't say that the permission is required suggests that this restriction was only added in Android v6.0.

Try to search for a Java solution and then it will be simpler to port it.
 

ilan

Expert
Licensed User
Longtime User
Top