A Flutter plugin to access and query call history log.
Support for Android only as iOS does not provide API for accessing call history
To use this plugin, add
call_log as a dependency in your
You may add the following permission to your Android Manifest:
<uses-permission android:name="android.permission.READ_CALL_LOG" />
This plugin is able to handle checking and requesting permission automatically.
Currently implemented query params are dateFrom, dateTo, durationFrom, durationTo, name and number.
String params are queried using LIKE and '%' wildcard on both sides.
// IMPORT PACKAGE import 'package:call_log/call_log.dart'; // GET WHOLE CALL LOG Iterable<CallLogEntry> entries = await CallLog.get(); // QUERY CALL LOG (ALL PARAMS ARE OPTIONAL) var now = DateTime.now(); int from = now.subtract(Duration(days: 60)).millisecondsSinceEpoch; int to = now.subtract(Duration(days: 30)).millisecondsSinceEpoch; Iterable<CallLogEntry> entries = await CallLog.query( dateFrom: from, dateTo: to, durationFrom: 0, durationTo: 60, name: 'John Doe', number: '901700000', type: CallType.incoming, );
Demonstrates how to use the call_log plugin.
For help getting started with Flutter, view our online documentation.
Add this to your package's pubspec.yaml file:
dependencies: call_log: ^1.0.5
You can install packages from the command line:
$ flutter packages get
Alternatively, your editor might support
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|1.0.5||Nov 5, 2018|
|1.0.4||Nov 5, 2018|
|1.0.3||Nov 5, 2018|
|1.0.2||Oct 21, 2018|
|1.0.1||Oct 21, 2018|
|1.0.0||Oct 21, 2018|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Nov 14, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.