xdh_call 0.0.7

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 38

xdh_call #

通话状态监听(目前仅仅支持安卓)

Getting Started #

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
    <uses-permission android:name="android.permission.SEND_SMS"/>
    <uses-permission android:name="android.permission.READ_SMS"/>

Example #

// IMPORT PACKAGE
import 'package:xdh_call/xdh_call.dart';

//监听通话状态
//1.初始化
XdhCall(_onEvent,_onError);
//2.定义回调方法
  void _onEvent(Object event) {
    print("调用自定义收到回复");
    setState(() {
      _platformVersion = event;
    });
    print(event);
  }

  void _onError(Object error) {
    print("收到错误");
  }
 // 拨打电话返回 "{'type':'outgoning_call','phone':'10086'}"
 // 挂断 "{'type':'call_state_idle','phone':'10086'}"
 // 接听 "{'type':'call_state_offhook','phone':'10086'}"
 // 呼入响铃 "{'type':'call_state_ringing','phone':'10086'}"

 //拨打系统电话
 //无需二次确认方式
 XdhCall.callphone("call",is_confirm:false,phone_number:'10086');
 //需要二次确认方式
 XdhCall.callphone("call",is_confirm:true,phone_number:'10086');

配合 call_log 你会有意想不到的组合 #

https://pub.dartlang.org/packages/call_log

上传感谢 https://www.cnblogs.com/yangyxd/p/9234405.html This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

0.0.1 #

  • 实现功能

0.0.2 #

  • 更新readme

0.0.3 #

  • 添加 两种拨打电话方式

0.0.4 #

  • 添加 发短信

0.0.6 #

  • 添加获取设备唯一标识

0.0.7 #

  • 获取通话记录

example/README.md

xdh_call_example #

Demonstrates how to use the xdh_call plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  xdh_call: ^0.0.7

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:xdh_call/xdh_call.dart';
  
Version Uploaded Documentation Archive
0.0.7 May 10, 2019 Go to the documentation of xdh_call 0.0.7 Download xdh_call 0.0.7 archive
0.0.6 May 8, 2019 Go to the documentation of xdh_call 0.0.6 Download xdh_call 0.0.6 archive
0.0.5 May 8, 2019 Go to the documentation of xdh_call 0.0.5 Download xdh_call 0.0.5 archive
0.0.4 May 8, 2019 Go to the documentation of xdh_call 0.0.4 Download xdh_call 0.0.4 archive
0.0.3 Feb 18, 2019 Go to the documentation of xdh_call 0.0.3 Download xdh_call 0.0.3 archive
0.0.2 Feb 17, 2019 Go to the documentation of xdh_call 0.0.2 Download xdh_call 0.0.2 archive
0.0.1 Feb 17, 2019 Go to the documentation of xdh_call 0.0.1 Download xdh_call 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
45
Overall:
Weighted score of the above. [more]
38
Learn more about scoring.

We analyzed this package on Jun 26, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.2
  • pana: 0.12.18
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/xdh_call.dart. (-1.99 points)

Analysis of lib/xdh_call.dart reported 4 hints:

line 18 col 10: Name non-constant identifiers using lowerCamelCase.

line 19 col 12: Name non-constant identifiers using lowerCamelCase.

line 53 col 12: Name non-constant identifiers using lowerCamelCase.

line 54 col 12: Name non-constant identifiers using lowerCamelCase.

Maintenance issues and suggestions

The description contains too many non-ASCII characters. (-20 points)

The site uses English as its primary language. The value of the description field in your package's pubspec.yaml field should primarily contain characters used in English.

Support latest dependencies. (-5 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8