Skip to content

[Bug]: location bug #1154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 of 5 tasks
BurkeDeng opened this issue Sep 15, 2023 · 2 comments
Closed
3 of 5 tasks

[Bug]: location bug #1154

BurkeDeng opened this issue Sep 15, 2023 · 2 comments

Comments

@BurkeDeng
Copy link

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Windows

Steps to reproduce

When I agreed to choose fuzzy positioning in the request location pop-up window, I was directly told that I rejected the positioning.

Expected results

When you agree to select fuzzy positioning, you should be able to obtain location information normally.

Actual results

PermissionStatus.denied

Code sample

Code sample
[Paste your code here]
 requestPermission() async {
    var status = await Permission.location.status;

    if (status.isDenied) {
      //权限未获得
      Log.d(tag, "权限未获得,开始请求权限");

      Map<Permission, PermissionStatus> statuses = await [
        Permission.location,
      ].request();

      if (statuses[Permission.location] == PermissionStatus.granted) {
        //定位权限获取
        Log.d(tag, "定位权限已获取");
      } else if (statuses[Permission.location] == PermissionStatus.denied) {
        //定位权限被拒绝
        Log.d(tag, "定位权限被拒绝");
      }
    } else {
      //权限已获得
      Log.d(tag, "权限已获得");
    }
  }

Screenshots or video

Screenshots or video demonstration

[Upload media here]

Version

permission_handler: ^11.0.0

Flutter Doctor output

Doctor output
[Paste your output here]
```Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
[√] Flutter (Channel stable, 3.0.5, on Microsoft Windows [版本 10.0.22000.739], locale zh-CN)
    • Flutter version 3.0.5 at D:\FlutterSDK\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (1 year, 2 months ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\Administrator\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: D:\JavaSDK\jdk-11\bin\java
    • Java version OpenJDK Runtime Environment OpenLogic-OpenJDK (build 11.0.20+8-adhoc..jdk11u)
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • Chrome at C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[!] Android Studio (version 2022.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    X Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[√] Connected device (3 available)
    • ANP AN00 (mobile) • A94VUT2B21007423 • android-arm64  • Android 12 (API 31)
    • Windows (desktop) • windows          • windows-x64    • Microsoft Windows [版本 10.0.22000.739]
    • Chrome (web)      • chrome           • web-javascript • Google Chrome 116.0.5845.97

[√] HTTP Host Availability
    • All required HTTP hosts are available


</details>
@JeroenWeener
Copy link
Contributor

Welcome @BurkeDeng, thank you for filing this issue.

I will be closing it, as it is a duplicate of #984. You can go there for a status update or to provide extra information.

@BurkeDeng
Copy link
Author

BurkeDeng commented Sep 15, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants