|
/

我已经是在勾选用户同意后才调用为什么还报这个“检测到未调用隐私授权API”

Zz******19
发布于 3 年前
91688来自广东省
移动统计 U-App
API调用

Row( children: [ Checkbox( value: _isAgree, onChanged: (val) { setState(() { _isAgree = !_isAgree; SpUtil.putBool(Constant.IS_AGREE, _isAgree); if (_isAgree) { print('同意用户协议和隐私政策'); initUmengSdk(); } }); }, ), const Expanded(child: UserAgreementText()), ],E/UMConfigure(22575): 检测到未调用隐私授权API,详情见:https://developer.umeng.com/docs/119267/detail/182050

9个回答
 
1 年前
来自甘肃省

建议把友盟的flutter插件的产品,拉出去枪毙5分钟,做的什么辣鸡DEMO

 
2 年前
来自广东省

private void initCommon(List args) {
String appkey = (String)args.get(0);
String channel = (String)args.get(2);
String pushSecret = null;
if(args.size() > 3) {
pushSecret = (String)args.get(3);
}
UMConfigure.submitPolicyGrantResult(getContext(), true);
UMConfigure.init(getContext(), appkey, channel, UMConfigure.DEVICE_TYPE_PHONE, pushSecret);
// android.util.Log.i("UMLog", "initCommon:"+appkey+"@"+channel);
// if (!TextUtils.isEmpty(pushSecret)) {
// android.util.Log.i("UMLog", "initCommon:"+"pushSecret :"+ pushSecret);
// }
}

我直接这样子解决了。

 
2 年前
来自广东省

flutter 里没有这个方法啊?

 
3 年前
来自浙江省

您好,UMConfigure.submitPolicyGrantResult(this, true); //every time 是每次启动都需要调用这个,这个是客户隐私协议弹窗点击同意或者拒绝之后需要手动调用的api。

Loading ...
登录社区,分享你的经验