I am unable to record incoming voice in some android phones

I have developed an app for call recording , it was working so far nice and charm but now issues are coming like “incoming voice is not recording” in NOUGAT and the latest version, but some phone able to record a call from earphone or speaker on mode but not in normal mode, what would be the issues?

hi bro send to me download link of source code than i can check and resolve it .

I got same problem, did you get any solution?