ajkh35 / contactsdemo Goto Github PK
View Code? Open in Web Editor NEWA sample application to demonstrate contacts syncing with android app.
A sample application to demonstrate contacts syncing with android app.
Running on Real Device
Lenovo A6000 (Android 5.0.2, API 21)
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.example.contacts, PID: 27374
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.IndexOutOfBoundsException: Invalid index 1123, size is 1123
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at com.example.contacts.MainActivity$1.doInBackground(MainActivity.java:38)
at com.example.contacts.MainActivity$1.doInBackground(MainActivity.java:30)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
I/Process: Sending signal. PID: 27374 SIG: 9
Application terminated.
before getting this error process running well and adding contact with custom account named "ContactDemo".
and added new contect it cannot attach with custom account, we suppose doInBackground() not working that why....
hey Brother!
the app is not working with 11 or more digits number.when i register 11 digit number it registerd successfully but in database it shows only 10 digits.how to fix this issue!
hey
i want to know how to save number with special characters such as"+,()$...
when i type this type of number it say enter valid number...
plz help!
it inserting a new contact in contacts app with existing contact instead of updating the contacts. if we have 4 contacts then after running app it display 8 contacts. how to update the existing contacts ?
Some contacts doesn't show the aggregated contact information. sometimes the contacts gets aggregated but they don't get updated in the contacts app upon restarting the device the contacts show up perfectly. Sometimes only a single contact gets stuck and does not show the aggregated contact whatever we do upon deleting and adding the contact again sometimes fixes the problem. If you have any suggestions i will appreciate it. Thankyou
Thanks for this project. I'm not an Android dev by any means, and I'm trying to put together a PoC for the Nextcloud project to demonstrate a better way of doing native contact syncing. This is the only project I've found that has most of the pieces in place out of the box.
I got the code to build and run after (poorly) adding some runtime permissions code. However, now I'm trying to figure out where the SyncAdapter is sending the contacts. I tried to find a URL field in the code so I could point it at a test server, but I don't see anything. What am I missing?
Also, do you have any suggestions on a project that implements the server-side code?
Thanks!
You've set targetSdk to 23, so you have to handle runtime permissions:
https://developer.android.com/training/permissions/requesting.html
Because you didn't you get a crash of this sort on the sample of the repo:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.ajay.contacts_4/com.example.ajay.contacts_4.MainActivity}: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{ecd6317 4450:com.example.ajay.contacts_4/u0a83} (pid=4450, uid=10083) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
I changed it to 22, but then nothing occurs.
I looked at the contacts app, and nothing is there (tested on emulator) .
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.