首页 > 解决方案 > 如何在颤振中断开电话?

问题描述

我制作了在给定号码上自动调用的应用程序,代码如下。现在我想在 fg 10 秒后断开该呼叫。如果是的话,有可能怎么做?

    android_intent.Intent()
      ..setAction(android_action.Action.ACTION_CALL)
      ..setData(Uri(scheme: "tel", path: _controllerPhone.text))
      ..startActivity().catchError((e) => print(e));

标签: androidandroid-studioflutterdart

解决方案


由于呼叫应用程序与您的应用程序是不同的应用程序,因此您无法干预。当然,如果您直接在应用程序中进行调用,您可以很容易地做到这一点。


推荐阅读