FORUMS
Remove All Ads from XDA

[APP][4.0+][ROOT] Contacts Sync - sync your address book contacts

1,761 posts
Thanks Meter: 407
 
By AndroidDeveloperLB, Senior Member on 19th October 2016, 01:57 PM
Post Reply Email Thread
WARNING: This app uses root operations that might not work in the future. It's recommended to backup your contacts before using it.

Background
Seeing that the only app that allows to sync your contacts photos is SyncMe, yet it can't sync with WhatsApp (and there is a good reason for this), I've decided to create this app.

What this app does
Its purpose is to sync your contacts photos on the address book with those on WhatsApp.

Download



Requirements and permissions explanation
  1. WhatsApp app being installed and working well. Tested on version 2.16.306 (build 451445).
  2. A rooted device. It is needed for getting the HQ contacts images, for auto-granting the other permissions, and for the automation of the entire process.
  3. Internet connection - allows WhatsApp to download the photos.
  4. Contacts permissions - the app needs to modify your contacts...
  5. Phone and usage-access permissions, so that the app could monitor WhatsApp Internet activity.
  6. Draw on top permission- for allowing to halt the process, and for staying on portrait mode during the process.

Isn't there a non-rooted version?
It is highly possible that I can make one. I started by using accessibility service to handle the automation, and I made it work for a single contact that has a photo.
It will take a long time till I can finish it, but it was a step in the right direction.
However, sadly, Google has recently warned all apps that use accessibility service for purposes that are not for disabled users (many articles about it, including here, here and here) , so for now this work is on hold, till I find out what is really going on.
They might remove the app or even my own Google account, according to these articles. I do not want to take this risk, after so much time working on it.
That being said, I might put here on XDA the app some day. Will take some time though. I may have made progress, but I didn't handle everything that needs to be handled.
In any case, this app is only for rooted devices. If I have non-rooted solution, I'm pretty sure I will make a new app for it.

If you wish, you can star this request I made to Google, to let all users use apps with accessibility functionality, equally, whether the users are disabled or not.

Recommended
  1. A good Internet connection
  2. Android 5.0 and above
  3. Some users say the app doesn't sync their contacts. I'm still investigating this issue, but for now, you can try to convert all your contacts to be on Google account. Some users said it helped, and some said that moving to another rom helped. Sorry if the app doesn't work for you even after those actions. Hope to find the reason for this.
    One user said this helped: backup contacts to vcf file. delete all contacts. Import vcf file in web browser into Google account. Let it sync on device. Use the app.

How it works
It currently only has 3 simple steps:
- grant permissions (needed only once).
- fetch photos.
- sync the photos.

All phases are easy to go by (just press a single button) , and are all automatic and based on things any power user can do anyway, given enough time and patience.
The last step can even be done in the background if you wish.

Do note that as it highly depends on how WhatsApp works, it is possible that one day a new version of WhatsApp will change too much, that it won't work.

If you've found any bug, please let me know.

Why no fully automatic background sync?
This is a bit problematic because :
  • it works in the foreground, and not the background
  • if you have a lock screen, the app will need to bypass it, which might be an issue.
  • it emulates touch operations, so if you are not aware of what's going on, it might have some risks in using it in the background
.

That being said, maybe I can overcome all of those, but it will take time, and this is a spare time app.
Maybe, at least in the near versions, I can at least allow to show a notification when it seems that there are new updates to contacts that can be synced.

Would it work with modded WhatsApp ?
Maybe, as long as the package name of it is the same as the official one (meaning "com.whatsapp"). Last time I checked the GBWhatsapp app (available here, called "GBWAPlus"), it worked fine with it.
Might not work in the future or on other mods.

Why not support more chatting apps? Telegram? Messenger? Viber? Skype? ...
I've spent an entire week finding what can be done with each of the top chatting apps, and failed to find a way to work with them.
Even Telegram, which is supposed to be open sourced, was found too complex to work with, and even if I did manage to work with it, its terms are that my app should be a chatting app too, with all of the basic features of a chatting app.
This will all take so much more time that I can afford for a spare time app, and it's out of the scope for the app to be a chatting app, just to sync photos.

The app says I don't have contacts. How come?
You probably didn't let it to sync with your address book yet. Let it have the permission it needs (mainly Contacts permission), and then run it, then run my app.
If all fail, uninstall and re-install both apps, and grant the needed permission to both, and then run my app.

The app fails to sync contacts or crashes even before. How come?
There are some issues related to address book that are out of this app's scope and responsibility.

Here are some possible workarounds:
1. One user wrote this:
Quote:

may be suggest him the way it works for me,export contacts from phone to vcf file,delete contacts from hone,through web, import vcf file to google,through phone sync contacts to google,through phone sync contacts to whatsapp, sync photos with your app

2. Another solution someone wrote is that clearing the data of "com.android.providers.contacts" package name fixed it.


I have "parallel apps" feature (AKA "cloning" of apps) on my phone , allowing multiple instances of apps. Why can't this app work well when it's turned on?
This feature that some devices have is not native Android feature and can cause real issues and break things. Sadly I couldn't find a way to overcome it (wrote about this here)https://stackoverflow.com/q/49930676/878126. It even doesn't work well in general, not allowing you to put widgets of the second one. Same goes for sharing. Please disable it before syncing using my app.

Tested devices and Android versions
Nexus 5X with Android 6.0.1 , Android 7.0 and Android 7.1.1.
HTC One M8 with stock Android 5.0.2
Nexus 6P Android 7.1.1 DP1
asus zenfone 2 lazer (ze550kl) 6.0.1 stock
Moto G3 with 7.0
Nexus 5 with CM13 (Android 6.0.1).
and more...

Articles
Privacy policy ?
Written on this post.


XDA:DevDB Information
Contacts Sync, App for the Apps & Games

Contributors
AndroidDeveloperLB

Version Information
Status: Testing

Created 2016-11-27
Last Updated 2017-01-04
The Following 29 Users Say Thank You to AndroidDeveloperLB For This Useful Post: [ View ] Gift AndroidDeveloperLB Ad-Free
 
 
19th October 2016, 01:57 PM |#2  
OP Senior Member
Thanks Meter: 407
 
More
Reserved
Privacy policy
I do not store anything of your device on any server. I don't even have or need a server for this app to function.
Everything this app does, it does locally on your own device.

All that is used is by/for ads of third party companies:
https://www.google.com/adsense/localized-terms?hl=en_US
19th October 2016, 02:18 PM |#3  
Member
Flag Pombal
Thanks Meter: 7
 
More
Can run more than 1 app clone for same aplication?
19th October 2016, 02:58 PM |#4  
OP Senior Member
Thanks Meter: 407
 
More
Quote:
Originally Posted by FabioAreia

Can run more than 1 app clone for same aplication?

I don't understand the question.
The app just syncs your contacts photos, with those that are on WhatsApp.
19th October 2016, 03:32 PM |#5  
Member
Flag Pombal
Thanks Meter: 7
 
More
Wrong thread. Sorry

Enviado do meu Vodafone Smart ultra 6 através de Tapatalk
19th October 2016, 03:34 PM |#6  
OP Senior Member
Thanks Meter: 407
 
More
Quote:
Originally Posted by FabioAreia

Wrong thread. Sorry

Enviado do meu Vodafone Smart ultra 6 através de Tapatalk

Can you delete the posts then?
If so, how do I do it too? I don't know ...
20th October 2016, 12:37 AM |#7  
OP Senior Member
Thanks Meter: 407
 
More
Updated version. What's new:
1. Fixed super user permissions granting issues.
2. Tweaked fetch images phase by using a safer (yet sadly slower) method. Hopefully will not miss any image now.
3. While fetching images, prevents screen from being automatically turned off, so that it won't fail later.

EDIT: I think I know why the app won't sync with some contacts. This happens in the case of a lot of contacts. I will have to fix this.
The Following User Says Thank You to AndroidDeveloperLB For This Useful Post: [ View ] Gift AndroidDeveloperLB Ad-Free
21st October 2016, 08:47 AM |#8  
OP Senior Member
Thanks Meter: 407
 
More
Updated version.
What's new:

1. Fixed issue of missing images.
2. Massive speed improvement of syncing phase. On some devices you won't even believe it did anything.
3. From now on, only new images will sync. This is another improvement in terms of efficiency.
23rd October 2016, 12:08 AM |#9  
david6910's Avatar
Senior Member
Thanks Meter: 39
 
More
No 4.4 compatibility?

Enviado desde mi SM-N910F mediante Tapatalk
29th October 2016, 07:20 PM |#10  
OP Senior Member
Thanks Meter: 407
 
More
Quote:
Originally Posted by david6910

No 4.4 compatibility?

Enviado desde mi SM-N910F mediante Tapatalk

What do you mean? It doesn't work on your 4.4 device?
29th October 2016, 07:34 PM |#11  
stunned's Avatar
Senior Member
Thanks Meter: 328
 
More
Does this sync pictures to google account, so I only have to do the sync once and then the pictures are stored to Google contacts in web?
Post Reply Subscribe to Thread

Tags
contacts, photos, sync

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes