Commit 57951b00ed1ba0de049cb083598537aab0e4b994

Authored by wdn127929
1 parent d3548fb5

权限说明仅在权限请求的时候

... ... @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
... ... @@ -532,7 +532,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5181;
CURRENT_PROJECT_VERSION = 5182;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -678,7 +678,7 @@
CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5181;
CURRENT_PROJECT_VERSION = 5182;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -714,7 +714,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5181;
CURRENT_PROJECT_VERSION = 5182;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ...
... ... @@ -270,7 +270,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
if (widget.initialIndex == 0 ||
widget.initialIndex == 1 && needRefreshTemp == false) return;
_initNotification();
Future.delayed(Duration(minutes: 5), () {
Future.delayed(Duration(minutes: 3), () {
//30000
ContactModel.getInstance().uploadLocalContact(context);
UserModel usermodel = Provider.of<UserModel>(context, listen: false);
... ... @@ -736,7 +736,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
//获取点击通知栏的自定义参数
_getIntent(Map param) async {
// if (param != null) {
_clearBadge(() {});
_clearBadge(() {});
// }
Map notifyParam = param;
... ... @@ -967,12 +967,15 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
/// 开启DEBUG
tpush.setEnableDebug(false);
String token = await XgFlutterPlugin.xgToken;
print(token);
try {
String token = await XgFlutterPlugin.xgToken;
print(token);
if (token != null && token.length > 0) {
userTokenInit(token);
if (token != null && token.length > 0) {
userTokenInit(token);
}
} catch (e) {
print(e);
}
/// 添加回调事件
... ... @@ -981,7 +984,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
// String token = await XgFlutterPlugin.xgToken;
// print(token);
// userTokenInit(token);
print("flutter onRegisteredDeviceToken: $msg");
},
onRegisteredDone: (String msg) async {
... ...
... ... @@ -111,6 +111,8 @@ class ContactModel {
// _openAddressBook(context);
if (!await checkContactPermission()) {
authority = await requestContactPermission();
} else {
authority = true;
}
if (authority) {
Iterable<Contact> contacts =
... ...
... ... @@ -50,11 +50,11 @@ class CallLogUtils {
}
} else {
try {
//全局提示权限使用目的
if (Platform.isAndroid) {
DialogUtil.showAuthorityDestination(context, 'h_call',
'通话记录和电话权限使用说明', '直接从通话记录中获得客户电话号码,快速录入预订信息。');
}
// //全局提示权限使用目的
// if (Platform.isAndroid) {
// DialogUtil.showAuthorityDestination(context, 'h_call',
// '通话记录和电话权限使用说明', '直接从通话记录中获得客户电话号码,快速录入预订信息。');
// }
Iterable<CallLogEntry> result = await CallLog.query();
return result;
... ...
... ... @@ -63,7 +63,11 @@ class DialogUtil {
static showAuthorityDestination(
BuildContext context, String name, String title, String subTitle) async {
Timer _timer = Timer(const Duration(seconds: 5), () {
Navigator.of(context).pop(true);
// if(!TickerMode.of(context)){
Navigator.of(context).pop(true);
// }
});
final action = await showDialog(
context: context,
... ...