cph-cachet / flutter-plugins

A collection of Flutter plugins developed by CACHET
526 stars 625 forks source link

[Health 10.2.0] Fetch data from background to show in android widgets #968

Open Amrazyan opened 1 month ago

Amrazyan commented 1 month ago

Device / Emulator and OS

Describe the bug

I want to show my steps in android widgets, so I need to fetch data in background, when testing it in emulator, it crashing with this error android.os.RemoteException: com.softconstruct.vigohealth must be in foreground to read the following data types [Steps, StepsCadenceSeries]

but when I test in real device downloaded from google internal testing it shows android.health.connect.HealthConnectException: java.lang.SecurityException: Caller does not have permission to read data for the following (recordType: class android.health.connect.datatypes.StepsRecord) from other applications.

Flutter doctor

[√] Flutter (Channel stable, 3.22.0, on Microsoft Windows [Version 10.0.22631.3593], locale en-US) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [√] Chrome - develop for the web [!] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.6) X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload, and include these components: MSVC v142 - VS 2019 C++ x64/x86 build tools

jsolra commented 3 weeks ago

same issue