I have a xamarin forms app in which user will make call from a button.I need to access the call log in the android part.How to provide the runtime permission for read call log? If I asked this permission will it cause any problems after submitting to the playstore?Because I saw some articles about dangerous permissions. Any help is appreciated.
1 Answers
First
About Runtime Permission.Google has improved the permission system in Android 6.0, changing some permissions related to user privacy to dynamically request authorization from the app runtime,you could refer to Runtime Permission and Document
you could refer to a sample(requset CallPhone permission,in your case you should change it to ReadCallLog):https://stackoverflow.com/a/56898446/10768653
you also could use the NugetPackage Plugin.Permissions to request runtime permissions simply
Second
Google has announced a new Play Store policy meant to prevent intrusive Android apps from collecting call log and SMS information from users' devices.According to Google, only an app that has been selected as the phone's default app for making calls or sending text messages will be able to access call logs and SMS data via the SMS and Call Log permissions.Google says that alternative APIs, such as the SMS Retriever API, the SMS Intent API, the Share Intent API, or the Dial Intent API can be used as replacements for some of the features powered by having direct access to the SMS and Call Log permissions.Related Blog;
and if you want to get a call duration,you could refer to :call duration