Bhavesh pandey
Bhavesh pandey

Reputation: 1

Get user call logs in flutter

I am new to flutter currently i am creating a flutter application where user need to get call history, i have done this in in java(native app) but i have no idea how to do this in flutter . and one more thing how to get run-time permissions for this I have checked documentation of flutter but got nothing related to this.

thank you .

Upvotes: 0

Views: 652

Answers (1)

Vismay Viradiya
Vismay Viradiya

Reputation: 111

use call_log plugin available in pub.dev here is the link : https://pub.dev/packages/call_log the only problem here is that this plugin is only supported in Android. you can use it like this

Iterable<CallLogEntry> _callLogEntries = <CallLogEntry>[];
_callLogEntries = CallLog.get();

do not forget to add call log permission in menifest file

    <uses-permission android:name="android.permission.READ_CALL_LOG" />

Upvotes: 1

Related Questions