Browse Source

1.修改监听还原场景的监听时间

tags/0.0.16+6
“yanghuaxuan” 3 years ago
parent
commit
33df8640e3
1 changed files with 9 additions and 8 deletions
  1. +9
    -8
      lib/pages/home_page/home_page.dart

+ 9
- 8
lib/pages/home_page/home_page.dart View File

@@ -94,6 +94,12 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
try { try {
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);


// mob锁粉隐私协议提交
Moblink.uploadPrivacyPermissionStatus(1, (bool success) {});
// mob分享SDK隐私协议提交
SharesdkPlugin.uploadPrivacyPermissionStatus(1, (bool success) {});
// mob短信SDK隐私协议提交
Mobcommonlib.submitPolicyGrantResult(true, (dynamic ret, Map err) => {});
// 监听开始(传递监听到原生端,用户监听场景还原的数据回传回来) // 监听开始(传递监听到原生端,用户监听场景还原的数据回传回来)
eventChannelSubscription = _eventChannel.receiveBroadcastStream().listen(_onEvent, onError: _onError); eventChannelSubscription = _eventChannel.receiveBroadcastStream().listen(_onEvent, onError: _onError);


@@ -104,7 +110,9 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
Timer(Duration(milliseconds: delay), () { Timer(Duration(milliseconds: delay), () {
NativeUtil.notifyInitSuccess(); NativeUtil.notifyInitSuccess();
//app后台杀死时候的还原 //app后台杀死时候的还原
Moblink.restoreScene(_restore);
Timer(Duration(milliseconds: 1500), () {
Moblink.restoreScene(_restore);
});
}); });
}); });


@@ -116,13 +124,6 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
//弹窗 //弹窗
_showPolicy(); _showPolicy();


// mob锁粉隐私协议提交
Moblink.uploadPrivacyPermissionStatus(1, (bool success) {});
// mob分享SDK隐私协议提交
SharesdkPlugin.uploadPrivacyPermissionStatus(1, (bool success) {});
// mob短信SDK隐私协议提交
Mobcommonlib.submitPolicyGrantResult(true, (dynamic ret, Map err) => {});

///设置推送标识 ///设置推送标识
setAlias(); setAlias();
// 是安卓系统,Android场景还原的实现 // 是安卓系统,Android场景还原的实现


Loading…
Cancel
Save