Giter Site home page Giter Site logo

flutter_contacts's People

Contributors

anggrayudi avatar jadasi avatar joachim-quis avatar joachimvalente avatar marcelomfranca avatar mohamedal-kainai avatar rahulraj-idt avatar sakchhams avatar scroollocker avatar starshipcoder avatar trfiladelfo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

flutter_contacts's Issues

Getting "The getter 'name' was called on null".

I have simple string of vCard, while parsing it, getting the error "The getter 'name' was called on null".

image

Here is the error message:

image

Screenshot of my flutter doctor:

image

What could be the possible solutions?

Unhandled Exception: RangeError (index): Invalid value: Not in inclusive range

with Version 1.1.2

  Future<void> insertContact() async {
    if (!await FlutterContacts.requestPermission(readonly: true)) {
      setState(() => _permissionDenied = true);
    } else {
      final contacts = await FlutterContacts.getContacts();
      setState(() => _contacts = contacts);

      for (var i = 0; i <= _contacts!.length; i++) {
        final fullContact = await FlutterContacts.getContact(_contacts![i].id);

        if (fullContact!.phones.first.normalizedNumber.isNotEmpty) {
          savecontact(userid, _contacts![i].displayName, fullContact.phones.first.normalizedNumber);
        }
      }
    }
  }

E/flutter (13307): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: RangeError (index): Invalid value: Not in inclusive range 0..69: 70
E/flutter (13307): #0 List.[] (dart:core-patch/growable_array.dart:254:60)
E/flutter (13307): #1 _MyHomePageState.insertContact (package:mypack/matapp.dart:159:48)
E/flutter (13307):

Is this a serious problem/error? Is there a solution? Thank you.

Phone Numbers are Empty

flutter_contacts: ^1.1.1+2
Tested on Android 6 on Samsung & Android 11 on Vivo
It fetches all contacts with id & display name, but all the other fields are empty!

Saving New Contact with Specified id

Hello,

Was wondering if its possible to save new contact with my own specified id?

Also is possible to update existing contact using id?

Hope to get your help.

Thanks,

Feature request: Additional contacts information

It would be nice to get the additional contacts information

  1. rawContactId
  2. deletion timestamp
  3. last modified timestamp
  4. source ID for the contacts I am the owner of (belonging to my account)

Android

  • deletion timestamps maybe with ContactsContract.DeletedContacts.CONTENT_URI, but therefore the minSdkVersion has to be upgraded to 18
  • last modification timestamp from the Contact
  • rawContactId, and source ID from the RawContact

IOS
In the IOS documentation I did not found a hint in order how to do such thing.

When loading contacts the app hangs, because serializing the contacts is done on the main thread

Hi, when I run the simple example, the GUI stops for some time, instead of having the circular progress indicator continue spinning until the contacts are shown. I first reported it here flutter/flutter#91992 , but now I understand this is a flutter_contacts issue. See a video here:

flutter-slow-contacts.mp4

I checked, and I'm pretty sure that the cause is that serializing the contacts is done on the main thread. I checked this by replacing this line:

                    GlobalScope.launch(Dispatchers.Main) { result.success(contacts) }

With this:

                    GlobalScope.launch(Dispatchers.Main) { result.success(contacts.subList(0, 5)) }

Meaning that all the contacts are retrieved from the phone, but only the first 5 are sent to the flutter app. In this case, the app doesn't hang.

I would be happy to try to fix this and send a pull request. I already managed to move the serialization to a thread in a sample app. However, android studio can't analyze the android directory for some reason, so it makes fixing this much harder. I reported it here: #31

Thanks,
Noam

null safety

Hello,

love your package.

Do you have any plants to migrate to null safety?

open app info function

Would it be possible to add a open app info function ?

use case is to change a previously denied Contact permission to Allowed.

Thank you !

Work without WRITE_CONTACTS permission

Hi,

I only intend to read contacts. I see that in order not to get a "permission denied" result, I have to add both READ_CONTACTS and WRITE_CONTACTS to AndroidManifest.xml.

Is it possible to only request the READ_CONTACTS permission, if I don't intend to modify contacts?

Thanks,
Noam

iOS Xcode 12.5 Could not cast value of type NSNull to NSString

Hi,

Just tried to use the iOS simulator today and it errors out after calling:

final _contacts1 = await FlutterContacts.getContacts();

error message:

Could not cast value of type 'NSNull' (0x10495cf18) to 'NSString' (0x10495cf78).

this plugin was working fine, so i thinking maybe something with the recently updated Xcode 12.5 ...

Thank you !

Android - events format

Hello, I am facing a formatting issue on Android when creating an event item. The event is created, edited and read successfully via code but cannot be modified on the phone contacts native menu as it contains time besides the date. The DateTime to what I have checked should be in the format yyyy-MM-dd without time. on IOS all seems to be working fine. I tested on a real device the time appears next to the date on the native contacts dates field while on an emulator, the field doesn't seem to appear to me at all yet readable via code. I face the same behavior on both create and update.

newContact = Contact.create()..name = Name(first: 'First', last: 'Last')..events = [Event(DateTime(2000, 1, 1), noYear: false, label: EventLabel.birthday)];

One secondary point that I noted is also when using updateContact(), it doesn't seem to support deleting an event item. Not sure if this is by design or not.

Issue on custom label socialMedia

Hi, i tried to set custom socialmedia, but label not set, is set such us AIM.

SocialMedia social = SocialMedia(IDController.value.text);
social.label = SocialMediaLabel.custom;
social.customLabel = 'com.linkmeeasy.profile';

i found in phone (android) as an AIM and loose customlabel.

Calling getContacts returns displayname, phone is null

Hello,

Just noticed this, calling getContacts doesnt return any phone numbers listed on the contact. I see the displaynames returned. When I was printing the contacts this is what I get -
flutter: Contact(id=D19B3862-865B-4D49-829F-8E8F7658A893:ABPerson, displayName=Home Surrey, thumbnail=null, photo=null, name=Name(first=, last=, middle=, prefix=, suffix=, nickname=, firstPhonetic=, lastPhonetic=, middlePhonetic=), phones=[], emails=[], addresses=[], organizations=[], websites=[], socialMedias=[], events=[], notes=[], accounts=[]).

Here is code which is exactly what I copied from here -
final contacts = await FlutterContacts.getContacts();

Please advise if I am doing anything wrong here.

_contacts!.length =0 , if stored in google account

I appreciate the good work (thanks),

Anyway I used this in my flutter app and it worked fine in the emulator.
I had a contact ListView.builder with rows and columns to make a contact list with thumbnails, but when I tried it
on a real Android 8.0 LG G5 phone the contact list did not work it was blank and no errors or crash massage
it was just empty I tried it on my S9 Android 10.0 it worked fine.

Does this repository work on below Android 10 ? or did I need to edit something somewhere and I missed it.

Updating a contact does not update the socialmedia information correctly

Hi,

when I update a contacts socialmedia information using the socialmedia label "custom", the information is not stored correctly on the device. The socialmedia label is changed to "aim" and the the custom label is lost if I fetch the contact after the update. Updating the socialmedia information with other labels seems to be working. The socialmedia usernames are stored correctly and updating other values like the name works fine as well. Setting custom labels on the device contact menu and fetching them with flutter_contacts works as well, thus I assume the issue is caused by the update method. Currently im testing on an Android emulator (Pixel 4, API: 30). Code example is below.

  Contact? contact = await FlutterContacts.openExternalPick();

  if (contact == null) return;
  // We need to fetch contact again with accounts (including the raw id)
  // to be able to update the contact later (required for android)
  contact = await FlutterContacts.getContact(
    contact.id,
    withAccounts: true,
    withProperties: true,
  );

  List<SocialMedia> socialMedias = [
    SocialMedia(
      "test1",
      label: SocialMediaLabel.custom,
      customLabel: "CustomLabel1",
    ),
    SocialMedia(
      "test2",
      label: SocialMediaLabel.jabber,
    ),
  ];

  contact?.socialMedias = socialMedias;

  contact?.update();

  // Output 1:
  print(contact?.socialMedias);

  if (contact == null) return;

  contact = await FlutterContacts.getContact(
    contact.id,
    withAccounts: true,
    withProperties: true,
  );

  // Output 2:
  print(contact?.socialMedias);

Output 1:

[SocialMedia(userName=test1, label=SocialMediaLabel.custom, customLabel=CustomLabel1), SocialMedia(userName=test2, label=SocialMediaLabel.jabber, customLabel=)]

Output 2:

[SocialMedia(userName=test1, label=SocialMediaLabel.aim, customLabel=), SocialMedia(userName=test2, label=SocialMediaLabel.jabber, customLabel=)]

Feature request: Get contacts related to an account

It would be nice to have a possibility to get all contacts that are assigned to an account.

Like this:

/// All contacts for the provided account will be fetched.
/// In case of no provided account, all contacts will be fetched
static Future<List<Contact>> getContacts(
          {bool withPhotos = false,
          bool sorted = true,
          Account account}
)

Block contact

Hi

How to block or unblock a contact? It's possible?

Thank you!

Feature request: Support for parsing custom vcard field

Hi,
I was trying to find a way to get custom data in parsed VCard String but had no luck.
Is there an existing functionality to get additional custom data from parsed VCard?
If not, it would be really helpful if there is a way to fetch values of custom label (CUSTOM) like an example below.
If you are okay with me making a PR, I can try to implement and create a PR for it.

Suggestion:

final vCard = Contact.fromVCard(rawData);
String customValue = vCard.getCustomValue("CUSTOM"); // == "some_custom_value"
...
BEGIN:VCARD
VERSION:3.0
PRODID:ez-vcard 0.11.2
N:Some;Name
ORG:Somewhere
TITLE:Some Title
EMAIL;TYPE=work:[email protected]
TEL:1231231234
CUSTOM:some_custom_value
END:VCARD

Thank you.

issue related to #9

Hi @joachimvalente ,this is a follow up on #9 the fix works as expected yet I noticed another issue only on Android. When using the same code of issue #9 to add an 'Address' (same code as issue #9 below)and the contact has an event item(birthday), the event item gets duplicated and de -duplicated with update() when adding and removing the address (dart removewhere to delete the address), same code has no issues on IOS.

fn1() async{

Contact testContact = await FlutterContacts.getContact('some ID');
Address testAddress = Address('test', customLabel: 'test' , label: AddressLabel.custom);
testContact.addresses.insert(0, testAddress);
await testContact.update();

}

Feature Request: CRUD for Raw Contacts

Thank you for this wonderful library. It would be great to be able to fully CRUD raw contacts. The way unified contacts are merged is not always beneficial to the user, so it would be great to be able to handle CRUD operations on raw contacts.

FlutterContacts.getContacts( withProperties: true,) contacts are empty

flutter_contacts: ^0.2.2
Flutter 1.22.4
iOS Simulator iPhone 12 Pro Max - 14.3

Use FlutterContacts.getContacts(). I can get contacts, but only hav display name, and id. I insert the contact with Phone and Organization, but phones and organizations is empty.
Then I use FlutterContacts.getContacts( withProperties: true,), contacts are empty.

Photo encoding is broken

The easiest way to see this is to do the following

Contact contact
avatar(contact) // DIsplays the photograph
String vCard = contact.toVCard();
contact = Contact.fromVCard(); // Silently fails with a FormatException on line 114 of vcard.dart
avatar(contact) // doesn't display a photo

The problem is in lines 327 to 340 of contact.dart. The padding isn't being done correctly. A simple way of fixing this is to get rid of all the individual line stuff and replace it with

  if (withPhoto && photoOrThumbnail != null) {
      final encoding = vCardEncode(base64.encode(photoOrThumbnail!));

      final prefix =
          v4 ? 'PHOTO:data:image/jpeg;base64,' : 'PHOTO;ENCODING=b;TYPE=JPEG:';
      lines.add(prefix + encoding);
    }

You do get a massively long line but all the clients of vCards I have tried seem to work.

Android FlutterContacts.requestPermission()) returns false

Hello,

on Android the FlutterContacts.requestPermission()) started returning false since yesterday changes:

https://github.com/QuisApp/flutter_contacts/blob/master/android/src/main/kotlin/co/quis/flutter_contacts/FlutterContactsPlugin.kt#L75

removing the recently changed grantResults!![1] line seems to fix the issue
grantResults!![1] == PackageManager.PERMISSION_GRANTED

@override
void initState() {
  super.initState();
  _askPermissions();
}

Future _askPermissions() async {
  if (!await FlutterContacts.requestPermission()) {
    setState(() => _permissionDenied = true);
  }
}

Thank you !

Feature request: Open contact in local address book

Open contact in local address book like in WhatsApp or described in
https://stackoverflow.com/questions/58864197/open-contacts-on-device-via-icon-tap-flutter

You can achieve this using Flutter platform channels and android Intent.ACTION_VIEW intent.

For example in your MainActivity register new channel and launch Contacts activity:

MethodChannel(flutterView, CHANNEL).setMethodCallHandler { call, result ->
launchContactActivity()
}

private fun launchContactActivity() {
val intent = Intent(Intent.ACTION_VIEW)
intent.type = ContactsContract.Contacts.CONTENT_TYPE
startActivityForResult(intent, REQUEST_CODE)
}

And on flutter side:

void launchContacts() async {
try {
await platform.invokeMethod('launch');
} on PlatformException catch (e) {
print("Failed to launch contacts: ${e.message}");
}
setState(() {
});
}

Please see full example. Hope this help.

Takes too long to load 1000+ contacts

When I tested with 200 to 300 contacts, it's not slow to get all contacts with properties, but when a device has 1000+ contacts, It takes **1 to 2 minutes** to get all.

openExternalPick function has returns contact without rawid

I updated openExternalPick function so that the returned contact can be updated . Previously it was throwing error because getContact has withAccounts to false by default.

Previously
  static Future<Contact?> openExternalPick() async {
    final id = await _channel.invokeMethod('openExternalPick');
    return id == null ? null : getContact(id);
  }
After updating
  static Future<Contact?> openExternalPick() async {
    final id = await _channel.invokeMethod('openExternalPick');
    return id == null ? null : getContact(id, withAccounts: true);
  }

Forked and made changes in below repo
https://github.com/abhay-s-rawat/flutter_contacts

The plugin not get all contacts

i used this package and not retreive all contacts only 267 contacts and stoped but when i used other package like contacts_service retreive all contacts

Couldn't read row 830, col 0 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.

Non-fatal Exception: java.lang.IllegalStateException

Couldn't read row 830, col 0 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.

android.database.CursorWindow.nativeGetString (CursorWindow.java)
android.database.CursorWrapper.getString (CursorWrapper.java:141)
co.quis.flutter_contacts.FlutterContacts$Companion.select$getString (FlutterContacts.java:190)
co.quis.flutter_contacts.FlutterContacts$Companion.select (FlutterContacts.java:196)
co.quis.flutter_contacts.FlutterContacts$Companion.select$default (FlutterContacts.java:55)
co.quis.flutter_contacts.FlutterContactsPlugin$onMethodCall$2.invokeSuspend (FlutterContactsPlugin.java:213)
kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (BaseContinuationImpl.java:33)
kotlinx.coroutines.DispatchedTask.run (DispatchedTask.java:106)
kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.java:571)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.java:750)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.java:678)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.java:665)

Getting this sometimes.

Trying to update 20 contacts i got this error

I/flutter (31118): Iteration >>>> 1
I/flutter (31118): Iteration >>>> 2
I/flutter (31118): Iteration >>>> 3
I/flutter (31118): Iteration >>>> 4
I/flutter (31118): Iteration >>>> 5
I/flutter (31118): Iteration >>>> 6
I/flutter (31118): Iteration >>>> 7
I/flutter (31118): Iteration >>>> 8
I/flutter (31118): Iteration >>>> 9
I/flutter (31118): Iteration >>>> 10
I/flutter (31118): Iteration >>>> 11
I/flutter (31118): Iteration >>>> 12
I/flutter (31118): Iteration >>>> 13
I/flutter (31118): Iteration >>>> 14
I/flutter (31118): Iteration >>>> 15
I/flutter (31118): Iteration >>>> 16
I/flutter (31118): Iteration >>>> 17
I/flutter (31118): Iteration >>>> 18
I/flutter (31118): Iteration >>>> 19
E/AndroidRuntime(31118): FATAL EXCEPTION: DefaultDispatcher-worker-12
E/AndroidRuntime(31118): Process: ci.dixapp, PID: 31118
E/AndroidRuntime(31118): android.content.OperationApplicationException: Too many content provider operations between yield points. The maximum number of operations per yield point is 500
E/AndroidRuntime(31118): at android.database.DatabaseUtils.readExceptionWithOperationApplicationExceptionFromParcel(DatabaseUtils.java:161)
E/AndroidRuntime(31118): at android.content.ContentProviderProxy.applyBatch(ContentProviderNative.java:528)
E/AndroidRuntime(31118): at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:532)
E/AndroidRuntime(31118): at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:520)
E/AndroidRuntime(31118): at android.content.ContentResolver.applyBatch(ContentResolver.java:1875)
E/AndroidRuntime(31118): at co.quis.flutter_contacts.FlutterContacts$Companion.update(FlutterContacts.kt:469)
E/AndroidRuntime(31118): at co.quis.flutter_contacts.FlutterContactsPlugin$onMethodCall$3.invokeSuspend(FlutterContactsPlugin.kt:92)
E/AndroidRuntime(31118): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
E/AndroidRuntime(31118): at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
E/AndroidRuntime(31118): at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
E/AndroidRuntime(31118): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
E/AndroidRuntime(31118): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
E/AndroidRuntime(31118): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

Kotlin compilation error for function 'onRequestPermissionsResult' in beta channel

Hi,

Console output

Running Gradle task 'assembleDebug'...

e: /dir/.pub-cache/hosted/pub.dartlang.org/flutter_contacts-1.1.3/android/src/main/kotlin/co/quis/flutter_contacts/FlutterContactsPlugin.kt: (27, 8): Class 'FlutterContactsPlugin' is not abstract and does not implement abstract member public abstract fun onRequestPermissionsResult(p0: Int, p1: Array<(out) String!>, p2: IntArray): Boolean defined in io.flutter.plugin.common.PluginRegistry.RequestPermissionsResultListener

e: dir/.pub-cache/hosted/pub.dartlang.org/flutter_contacts-1.1.3/android/src/main/kotlin/co/quis/flutter_contacts/FlutterContactsPlugin.kt: (137, 5): 'onRequestPermissionsResult' overrides nothing

FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':flutter_contacts:compileDebugKotlin'.

Found solution

Here is current signature of function onRequestPermissionsResult.

override fun onRequestPermissionsResult(
    requestCode: Int,
    permissions: Array<out String>?,
    grantResults: IntArray?
): Boolean

WHEN I CHANGE PARAMETERS TO NON-NULLABLE THEN IT BUILDS SUCCESSFULLY.

override fun onRequestPermissionsResult(
    requestCode: Int,
    permissions: Array<out String>,
    grantResults: IntArray
): Boolean

Please use this fix if it's correct or please guide me how to solve issue in the right way. Thanks.

P.S. Additional info

Settings of my app:

pubspec.yaml
flutter_contacts: 1.1.3

build.gradle
ext.kotlin_version = '1.6.10'
classpath 'com.android.tools.build:gradle:7.1.2'

gradle-wrapper.properties
distributionUrl=https://services.gradle.org/distributions/gradle-7.4.1-all.zip

can not read person with group

if someone has a group then can`t read him (it doesn`t read him at first time, if he has a group)

final contacts = await FlutterContacts.getContacts(withGroups: true);

not working at all

Issue on website

i'm trying to create a contact with website,

Website web = Website(WebsiteController.value.text);
web.label = WebsiteLabel.custom;
web.customLabel = 'My Personal Website';
print(WebsiteController.value.text);

in debug, print write my website,
but the website is missing in the contact created.

EXC_BAD_ACCESS - DartWorker exception

There is a random exception when I load the contacts, it happens only sometimes:

thread #47, name = 'DartWorker', stop reason = EXC_BAD_ACCESS (code=1, address=0x680)

The Contact class doesn't support the "nickname" field

This field is used quite a lot in younger people's contact lists. It's an easy add since it's a simple textfield in the vCard and incredibly easy to parse.

Would it be possible to add this?

p.s. Thanks for fixing the image encoding thing so quickly. It really solved a problem in my app.

Issue in Contact.fromMap()

E/flutter ( 5209): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: type 'Item' is not a subtype of type 'Map<dynamic, dynamic>'
E/flutter ( 5209): #0 new Contact.fromMap.
package:contacts_service/contacts_service.dart:237
E/flutter ( 5209): #1 MappedListIterable.elementAt (dart:_internal/iterable.dart:413:31)
E/flutter ( 5209): #2 ListIterator.moveNext (dart:_internal/iterable.dart:342:26)
E/flutter ( 5209): #3 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:188:27)
E/flutter ( 5209): #4 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
E/flutter ( 5209): #5 new List.of (dart:core-patch/array_patch.dart:50:28)
E/flutter ( 5209): #6 ListIterable.toList (dart:_internal/iterable.dart:213:44)
E/flutter ( 5209): #7 new Contact.fromMap
package:contacts_service/contacts_service.dart:237

Feature request: Add parameters to openExternalInsert()

The main thing I really want is for the user to have the option whether to save the contact to device or cloud storage. I saw that openExternalInsert() gives the option to do that, but there's no way to pre-populate it (that I'm aware of). I tried a solution using insert() first, then openExternalEdit(contact.id), but apparently the storage location for existing contacts can't be changed. So I was wondering if it was possible to pre-populate the fields of the native contact creator via passing parameters to openExternalInsert(). But if there's already a way to do this, any guidance would be appreciated.

Edit: Preferably, the parameter would just be of type Contact

update issue

Hello first. Upon running the function below on Android, if the contact has a picture assigned it gets deleted ( seems to be deleted). Same happens when trying to update a contact name. When the function below runs, the address is updated successfully but the pic is not visible on the device native contacts app. I have tested on both an emulator and a real device. The same code works OK for IOS without issues.

fn1() async{

Contact testContact = await FlutterContacts.getContact('some ID');
Address testAddress = Address('test', customLabel: 'test' , label: AddressLabel.custom);
testContact.addresses.insert(0, testAddress);
await testContact.update();

}
This is on version ^0.2.2 as I haven’t yet migrated to null safety.

Contacts stored in SIM card

Hi everyone , this isn't really an issue but I've been looking for a package that supports getting contacts from mobile Sim cards in addition to contacts stored in the phone memory , could you please advise on whether this plugin is able to fetch contacts from Sim cards ?

When opening the android dir using Android Studio there are many unresolved references

Hi, I want to try to make a pull request for fixing an issue - #32. However, when I open the android directory with android studio, I get may "Unresolved Reference" problems with the FlutterContactsPlugin.kt file: NonNull, core, io, kotlinx, FlutterPlugin, etc.

I suspect that the gradle files have some sort of problem, but I don't know enough about it to fix it.

Fixing this would allow me to hack on flutter_contacts, and hopefully to fix the other issue.

Thanks,
Noam

Updating contact is destroying my contact

Android 11, Redmi Note 8 Pro

When updating my contact with an updated note (see code below), my contact gets brokened up:

  • all the information is erased from the contact (name gone, email gone, all inner info gone)
  • the picture or thumbnail remains
  • the contact is not deleted, only empty.

From trying with several contacts, it looks like this happens to contacts that have a thumbnail but no image. When both are there, i did not see the problem happening.

Here is the relevant code used below, let me know if you need more.

    Contact? contact= await FlutterContacts.getContact(friend.contactImportId,
        withPhoto: true, withThumbnail: true, withProperties: true,withAccounts: true);
    if(loadedContact == null){
      print("loadedContact == null");
      return;}
    print("ContactID = ${friend.contactImportId}");

................

    List<Note> notes = contact.notes;
    Note note = notes[0];
    note.note += toStoreString;
    await contact.update();

CUSTOM_RINGTONE

Hi, how are you?

I am happy with your work.
And could you try to add custom_ringtone feature to this package, please?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.