通话记录权限

master
戴余标 2 years ago
parent 46e3b7a6a0
commit bc2ed41326

@ -25,7 +25,7 @@ final Uri _url = Uri.parse('https://www.dxbs.vip//explain.html');
// }
bool sms=false;
bool plone=false;
bool callLog=false;
@override
@ -40,6 +40,7 @@ class _PrivacyRightsPageState extends State<PrivacyRightsPage> {
Future<void> _listenForPermissionStatus() async {
sms=await Permission.sms.request().isGranted;
plone =await Permission.phone.request().isGranted;
callLog=await Permission.callLog.request().isGranted;
setState(() {});
}
@override
@ -61,7 +62,7 @@ class _PrivacyRightsPageState extends State<PrivacyRightsPage> {
body: Column(children: [
_getRights("获取设备来电状态","用于获取来电状态",plone),
_getRights("获取设备短信权限","用于发送短信",sms),
_getRights("获取设备通话记录","用于获取来电",callLog),
],)

@ -782,16 +782,20 @@ packages:
permission_handler:
dependency: "direct main"
description:
name: permission_handler
url: "https://pub.dartlang.org"
source: hosted
path: "."
ref: HEAD
resolved-ref: bd29aebfbeba4072d78468d3f623017459cc9566
url: "https://git.oa00.com/austin_dai/permission_handler.git"
source: git
version: "10.0.0"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
url: "https://pub.dartlang.org"
source: hosted
path: "."
ref: HEAD
resolved-ref: b9cfe590e6f2ca13990c696802e285d747ac7067
url: "https://git.oa00.com/austin_dai/permission_handler_android.git"
source: git
version: "10.0.0"
permission_handler_apple:
dependency: transitive

@ -40,7 +40,9 @@ dependencies:
# 获取通话记录
call_log: ^4.0.0
permission_handler: ^10.0.0
permission_handler:
git:
url: https://git.oa00.com/austin_dai/permission_handler.git
# 后台设置
flutter_background_service: ^2.1.3
flutter_background_service_android: ^2.0.3

Loading…
Cancel
Save