Flock icon indicating copy to clipboard operation
Flock copied to clipboard

Can't import local contacts

Open paride opened this issue 10 years ago • 5 comments

I'm running Flock on Cyanogenmod 11m12. Most of my contacts are local, I'm sure about this as when I edit them I see that it is "Phone-only, unsynced contact". I would like to import these contacts in Flock, but the "Local storage" option says that I have 0 contacts to import. Even if I try anyway no contact is imported. I'll be happy to provide any further information. Thanks!

paride avatar Jan 14 '15 03:01 paride

hello @legovini,

I tried to reproduce on stock Android Lollipop after a factory reset but was unable. My process for testing this was:

  1. factory reset my nexus 7
  2. import my google account on device setup
  3. export contacts to external storage via the native feature
  4. remove my google account from the device
  5. import contacts from external storage via the native feature
  6. install flock and import local contacts

I can think of a couple reasons why this didn't work for you:

  • The ContactsProvider on stock android stores all "local" contacts with ContactsContract.RawContacts.ACCOUNT_TYPE = null, if Cyanogenmod does not do the same then it would make sense that no local contact show up.
  • Another possibility is that Flock is being blocked from reading contacts by some privacy guard or whatever, I know there are some strange apps you can use to configure crazy specific Android permission policies and this has been a problem with Flock before.

I'll poke around Cyanogenmod's code base and see if I can clear up the first of these two possibilities.

rhodey avatar Feb 25 '15 19:02 rhodey

Hello @rhodey,

thanks for trying to find out where the problem is. The steps you made to reproduce the problem are the same I did, the only difference is that I skipped the Google account part (I already had the .vcf file with the contacts). Just to be clear this is what I did:

  1. Install Cyanogenmod 11 (Android 4.4.4)
  2. Import a .vcf file with the native feature, these contacts were not synced with any account
  3. Setup a Google account. The previously imported contacts were not synced with this account, so this step should not matter.
  4. Install flock, but it says I have 0 local contacts. The Google account also has some contacts, and these are correctly seen by Flock.

I don't know about the ACCOUNT_TYPE, but I would be surprised if they changed it from AOSP. If I have any way to check just let me know. I set up no privacy guard restrictions for Flock

I'll be very happy to subscribe for a Flock account if this will be fixed.

paride avatar Feb 26 '15 10:02 paride

@legovini You should be able to export your phone-only contacts to sdcard and import them into the Flock account, all with the normal contacts app.

untitaker avatar Apr 06 '15 21:04 untitaker

You are probably right, thanks for the suggestion, but the Flock function to import the local contacts remains broken. Moreover, there isn't a really convenient way to export only the phone-only contacts to sdcard, but this is another issue.

paride avatar Apr 06 '15 23:04 paride

Was just coming to report the same thing. Seems CM store local contacts with a type of com.android.localphone

root@grouper:/ # sqlite3 /data/data/com.android.providers.contacts/databases/contacts2.db "SELECT * FROM accounts"                                                                            
1|PHONE|com.android.localphone|

Also, @untitaker's solution doesn't seem to work in my situation, perhaps because I'm no gapps. Adding a new contact gives me a popup that says "Your new contact won't be backed up. Add an account tha backs up contacts online?" with two button options: "Keep Local" or "Add account".

"Keep local" has the problem explained in this issue and choosing "Flock" from the "Add account" popup gives the toast notifcation "Flock users may not have multiple accounts"

patcon avatar Jul 08 '15 08:07 patcon