由于拨打电话数据用户的隐私,再者由于在5.0之后Android更注重于用户的隐私权限,为此出现了在低版本没有的问题,而在高版本出现的个别问题!

   Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:"
                    + "4008109899"));

 startActivity(intent);
  • 1
  • 2
  • 3
  • 4

Missing permission required by intent Intent.ACTION_cALL; android.permission.CALL ErrorException!

发现在Android 5.0之后启动的格式必须是显示的不能使用隐示启动!

之后根据一些相关的查阅和浏览将其改为显示启动即可! 
在这里我们还是模拟拨打电话的事例

   Intent intent = new Intent();
   intent.setAction(Intent.ACTION_CALL);
   intent.setData(Uri.parse("tel:"
                    + "4008109899"));
    startActivity(intent);

相关文章:

  • 2022-01-07
  • 2022-12-23
  • 2021-12-12
  • 2021-05-13
  • 2021-10-20
  • 2021-05-15
  • 2021-10-24
  • 2022-12-23
猜你喜欢
  • 2021-06-10
  • 2021-11-21
  • 2021-09-02
  • 2021-04-28
  • 2021-07-03
  • 2021-05-13
相关资源
相似解决方案