-1

How can I fetch call-log and SMS from android device. I read many docs on that and I found we have to request google for our required permission. Can anyone tell me what is a change in code? or work the same code?

2 Answers2

0

An app I created Recently Required SMS and CALL_LOG Permissions. It was Executed Successfully on Android 9.0 (Pie). Thus, I don't think there were any changes to the APIs being used to do so. But I do believe Google Updated Their Policies so You might not be able to pass the SafetyNet Check or You might not be able to Publish your app on the Play Store. If there are any More Questions, I'd be happy to help!

Jaynam Modi
  • 556
  • 3
  • 14
  • Hello **@hewhomustnotbenamed**, Thank you so much for your help. - it means that as per google new policy we not publish our new app with sms & call-log permission and now android not allow to fetch all sms and call-log in 3rd party app like Ios. **i'm Right?** – Haresh Solanki Feb 20 '19 at 05:20
  • Not exactly...you CAN publish your App if you're a recognised Developer and Pass Google's SafetyNet Check...AND for that Second Part...you CANNOT Publish your app but Android Still Allows you to fetch SMS and call-logs if an app asks for it – Jaynam Modi Feb 21 '19 at 08:52
  • Meaning...you can use the APIs as intended..but if you do..you can't get the app on the Play Store...everything else remains as it was – Jaynam Modi Feb 21 '19 at 08:53
  • @HareshSolanki – Jaynam Modi Feb 28 '19 at 09:40
0

Up Until Api 28, things should work fine as long as you have your READ_CALL_LOG & WRITE_CALL_LOG permission mentioned in the Manifest file, and you must be requesting them during the runtime. From Android 10 onwards (Api 29+), Google has introduced what they call as Hard and soft restrictions in Android 10. SMS and Call Logs now fall under hard restricted permission, for which you need to fill up a form (Thanks to this medium article for pointing this out)while publishing your app. As far as I know and from what I have tried, when I include the READ_CALL_LOG in the manifest and when I request the permission during runtime, it works flawlessly up until API 28, but for API29+ (Android 10 and up), it fails, and it does not even pop up during runtime although I was able to navigate manually into the settings and grant the permission.

Anirudh Ganesh
  • 446
  • 4
  • 22