Skip to content

[Request]: sensor_plus插件在flutter3.38以上版本运行时,触发隐私合规问题 #3728

Description

@ttao-ya

Plugin

sensor_plus

Use case

Flutter 3.38后,FlutterActivity 会在更早的生命周期就 attach 全部 ActivityAware 插件;在sensor_plus的attach里,attach时就获取了设备的传感器。这导致 在app第一次启动后,用户还没有点击同意隐私授权,flutter侧就访问了设备传感器,这在商店审核时是不合规的,不符合隐私合规。

Proposal

能不能把 ActivityAware.onAttachedToActivity 改成惰性初始化,只在 Dart 订阅时才去访问传感器。

Activity

  1. ddxl123 commented on Dec 24, 2025

    @ddxl123

    同样问题,忙活了一天找不着问题所在,找到了这个包发现了这个问题,原来如此
    The same problem. I spent the whole day searching but couldn't figure out the cause. Then I found this bag and discovered the issue. So that's how it happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions