Explorar el Código

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

tags/0.0.16+6
“yanghuaxuan” hace 3 años
padre
commit
33df8640e3
Se han modificado 1 ficheros con 9 adiciones y 8 borrados
  1. +9
    -8
      lib/pages/home_page/home_page.dart

+ 9
- 8
lib/pages/home_page/home_page.dart Ver fichero

@@ -94,6 +94,12 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
try {
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);

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

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

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

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


Cargando…
Cancelar
Guardar