cph-cachet / flutter-plugins

A collection of Flutter plugins developed by CACHET
550 stars 678 forks source link

App Crash #1076

Open ShivuCod opened 2 weeks ago

ShivuCod commented 2 weeks ago

Plugin Name

activity_recognition

Plugin Version

5.0.0

Device

SAMSUNG

Operating System

Android 14

Describe the bug

When i run this package example after allowing permission after app crashed, I got errors

Steps to Reproduce

  1. Just open App
  2. Allow Permission
  3. App Crashed

Expected Behavior

After Allowing Permission start activity reorganization.

Actual Behavior

App Crashed😬😬

Flutter Logs

E/AndroidRuntime(22361):    at android.os.Looper.loop(Looper.java:319)
E/AndroidRuntime(22361):    at android.app.ActivityThread.main(ActivityThread.java:8919)
E/AndroidRuntime(22361):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(22361):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
E/AndroidRuntime(22361):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
E/AndroidRuntime(22361): Caused by: android.app.MissingForegroundServiceTypeException: Starting FGS without a type  callerApp=ProcessRecord{4b02353 22361:dk.cachet.activity_recognition_flutter_example/u0a642} targetSDK=34
E/AndroidRuntime(22361):    at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:53)
E/AndroidRuntime(22361):    at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:49)
E/AndroidRuntime(22361):    at android.os.Parcel.readParcelableInternal(Parcel.java:4882)
E/AndroidRuntime(22361):    at android.os.Parcel.readParcelable(Parcel.java:4864)
E/AndroidRuntime(22361):    at android.os.Parcel.createExceptionOrNull(Parcel.java:3064)
E/AndroidRuntime(22361):    at android.os.Parcel.createException(Parcel.java:3053)
E/AndroidRuntime(22361):    at android.os.Parcel.readException(Parcel.java:3036)
E/AndroidRuntime(22361):    at android.os.Parcel.readException(Parcel.java:2978)
E/AndroidRuntime(22361):    at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7234)
E/AndroidRuntime(22361):    at android.app.Service.startForeground(Service.java:775)
E/AndroidRuntime(22361):    at dk.cachet.activity_recognition_flutter.ForegroundService.startPluginForegroundService(ForegroundService.java:88)
E/AndroidRuntime(22361):    at dk.cachet.activity_recognition_flutter.ForegroundService.onCreate(ForegroundService.java:25)
E/AndroidRuntime(22361):    at android.app.ActivityThread.handleCreateService(ActivityThread.java:5098)
E/AndroidRuntime(22361):    ... 9 more
Lost connection to device.

Exited.

Screenshots

No response

Flutter Doctor Output

[√] Flutter (Channel stable, 3.24.3, on Microsoft Windows [Version 10.0.19045.4651], locale en-IN)
[√] 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
[X] Visual Studio - develop Windows apps
    X Visual Studio not installed; this is necessary to develop Windows apps.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2023.2)
[√] IntelliJ IDEA Ultimate Edition (version 2024.2)
[√] VS Code (version 1.95.1)
[√] Connected device (4 available)
[√] Network resources

Additional Information

No response