0
votes

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
Why exactly do you want to read the call log?FreakyAli
I am developing an app for employee tracking. Employees supposed to do call from number from app and the call duration is to be uploaded to their database.it will used for calculation incentives for them. so thats why I accessing the logAnand
@G.hakim is it possible bro?Anand
Well, I think it can be done on Android you, as anyways multiple apps are already doing it. Check this out for a simple detail developer.android.com/guide/topics/permissions/overview Also check the comments here stackoverflow.com/q/39870043/7462031FreakyAli

1 Answers

2
votes

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