Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Can't import local contacts #85

Open
paride opened this issue Jan 14, 2015 · 5 comments
Open

Can't import local contacts #85

paride opened this issue Jan 14, 2015 · 5 comments

Comments

@paride
Copy link

paride commented Jan 14, 2015

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!

@rhodey rhodey added the bug label Feb 13, 2015
@rhodey rhodey added need more info and removed bug labels Feb 25, 2015
@rhodey
Copy link
Contributor

rhodey commented Feb 25, 2015

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.

@paride
Copy link
Author

paride commented Feb 26, 2015

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.

@untitaker
Copy link

@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.

@paride
Copy link
Author

paride commented Apr 6, 2015

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.

@patcon
Copy link

patcon commented Jul 8, 2015

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"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants