Skip to content
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

Did not fetching contacts from Mi A1 Device Android Version 9 #88

Open
usamamanzoor07 opened this issue Dec 13, 2022 · 5 comments
Open
Labels
bug Something isn't working

Comments

@usamamanzoor07
Copy link

usamamanzoor07 commented Dec 13, 2022

@joachimvalente @scroollocker @anggrayudi @jadasi I am using flutter_contacts package it is smoothly running on all devices except Mi A1 Android Version 9 and contacts permission is enabled in it. I checked it in app permissions. No Error but returning null on all functions including getContacts and openExternalPick.

@Shahidbangash
Copy link

I have the same issue with Ios Simulator and Phone, Although Contact Permission is granted already. In my case

this code returns zero contacts although I have contacts in my native contact app.

FlutterContacts.getContacts( // (phones, emails, addresses, websites, etc) // <<<<< NOTE: [withProperties] is required for accounts withProperties: true, sorted: false, withAccounts: true, );

Here is my Flutter Doctor summary

`[✓] Flutter (Channel stable, 3.3.7, on macOS 13.1 22C5033e darwin-arm, locale en-PK)
• Flutter version 3.3.7 on channel stable at /Users/admin/Downloads/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision e99c9c7cd9 (6 weeks ago), 2022-11-01 16:59:00 -0700
• Engine revision 857bd6b74c
• Dart version 2.18.4
• DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc1)
• Android SDK at /Users/admin/Library/Android/sdk
• Platform android-33, build-tools 33.0.0-rc1
• ANDROID_HOME = /Users/admin/Library/Android/sdk
• ANDROID_SDK_ROOT = /Users/admin/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14B47b
• CocoaPods version 1.11.3

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
• Android Studio at /Applications/Android Studio.app/Contents
• 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
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)

[✓] VS Code (version 1.74.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.54.0

[✓] VS Code (version 1.74.0-insider)
• VS Code at /Users/admin/Downloads/Visual Studio Code - Insiders.app/Contents
• Flutter extension version 3.55.20221129

[✓] Connected device (3 available)
• IPhone 12 (16.1) (mobile) • 6E35EF09-1791-4919-8599-ACFBEBAA21CC • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-1 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.1 22C5033e darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 108.0.5359.124

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

• No issues found!`

@Shahidbangash
Copy link

I was able to import all native contact after commenting parameters in getContact().

Here is the Code
`

    try {
    
    final List<Contact> contactsFromIos = await FlutterContacts.getContacts(
    withAccounts: true,
    );
    
    log('Contact from Native for Ios is ${contactsFromIos.length}');

    } on Exception catch (e, stack) {
    log(stack , stackTrace: stack,);
  }`

// Note this issue is only caused by Ios device and simulators

@ghost
Copy link

ghost commented Feb 1, 2023

@joachimvalente @scroollocker @anggrayudi @jadasi I am using flutter_contacts package it is smoothly running on all devices except Mi A1 Android Version 9 and contacts permission is enabled in it. I checked it in app permissions. No Error but returning null on all functions including getContacts and openExternalPick.

I can confirm the same issue. Is there a solution?
BTW: This has nothing to do with iOS.

@joachim-quis
Copy link
Contributor

Thanks for reporting! I will look into it shortly.

@joachim-quis joachim-quis added the bug Something isn't working label Feb 9, 2023
@alperenderici
Copy link

alperenderici commented Dec 20, 2023

@joachim-quis For Android version 9 the problem still persists. I can not fetch contacts even permission granted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants