carp-dk / carp-dk/flutter-plugins
[activity_recognition: 5.0.0] App Crash
- Dominant language
- Dart
- Stars
- 608
- Forks
- 735
- Avg merge
- 1m
- Merged PRs (30d)
- 3
Description
### 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
```shell
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
```shell
[√] 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_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.