通话记录权限

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 sms=false;
bool plone=false; bool plone=false;
bool callLog=false;
@override @override
@ -40,6 +40,7 @@ class _PrivacyRightsPageState extends State<PrivacyRightsPage> {
Future<void> _listenForPermissionStatus() async { Future<void> _listenForPermissionStatus() async {
sms=await Permission.sms.request().isGranted; sms=await Permission.sms.request().isGranted;
plone =await Permission.phone.request().isGranted; plone =await Permission.phone.request().isGranted;
callLog=await Permission.callLog.request().isGranted;
setState(() {}); setState(() {});
} }
@override @override
@ -61,7 +62,7 @@ class _PrivacyRightsPageState extends State<PrivacyRightsPage> {
body: Column(children: [ body: Column(children: [
_getRights("获取设备来电状态","用于获取来电状态",plone), _getRights("获取设备来电状态","用于获取来电状态",plone),
_getRights("获取设备短信权限","用于发送短信",sms), _getRights("获取设备短信权限","用于发送短信",sms),
_getRights("获取设备通话记录","用于获取来电",callLog),
],) ],)

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

@ -40,7 +40,9 @@ dependencies:
# 获取通话记录 # 获取通话记录
call_log: ^4.0.0 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: ^2.1.3
flutter_background_service_android: ^2.0.3 flutter_background_service_android: ^2.0.3

Loading…
Cancel
Save