You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have carefully read the documentation and verified I have added the required platform specific configuration.
Please select affected platform(s)
Android
iOS
Windows
Steps to reproduce
When location permission is granted, the app displays a "Too much work on the main thread" message and triggers an ANR (App Not Responding) popup. However, the app functions properly when location permission is denied.
Expected results
If location permissions are granted, then want to an application will function properly.
Actual results
When location permission is granted, the app displays a "Too much work on the main thread" message and triggers an ANR (App Not Responding) popup. However, the app functions properly when location permission is denied.
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="false"
android:largeHeap="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<provider
android:name="vn.hunghd.flutterdownloader.DownloadedFileProvider"
android:exported="false"
android:authorities="${applicationId}.flutter_downloader.provider"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
<!-- Google Maps API KEY -->
<!-- <meta-data-->
<!-- android:name="com.google.android.geo.API_KEY"-->
<!-- android:value="AIzaSyCHZlts47h-ZLLIgBK7D0m8LLzCNA4xkmY" />-->
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="high_importance_channel" />
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<service
android:name=".com.transistorsoft.locationmanager.service.TrackingService"
android:enabled="true"
android:exported="false"
android:foregroundServiceType="location">
<!-- Additional service settings here -->
</service>
<service
android:name=".com.transistorsoft.locationmanager.service.LocationRequestService"
android:enabled="true"
android:exported="false"
android:foregroundServiceType="location">
<!-- Additional service settings here -->
</service>
</application>
Please check the following before submitting a new issue.
Please select affected platform(s)
Steps to reproduce
When location permission is granted, the app displays a "Too much work on the main thread" message and triggers an ANR (App Not Responding) popup. However, the app functions properly when location permission is denied.
Expected results
If location permissions are granted, then want to an application will function properly.
Actual results
When location permission is granted, the app displays a "Too much work on the main thread" message and triggers an ANR (App Not Responding) popup. However, the app functions properly when location permission is denied.
Code sample
#AndroidManifest.xml
#Location permission request code
await permission.Permission.locationAlways.request().isGranted ||
await permission.Permission.locationWhenInUse.request().isGranted ||
await permission.Permission.location.request().isGranted
Screenshots or video
Screenshots or video demonstration
[Upload media here]
Version
permission_handler: ^11.3.1
Flutter Doctor output
[✓] Flutter (Channel stable, 3.24.3, on macOS 14.5 23F79 darwin-arm64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.96.4)
[✓] Connected device (4 available)
[✓] Network resources
• No issues found!
The text was updated successfully, but these errors were encountered: