I have 800+ contacts in my android mobile, when I try to upload, its taking 30 sec - 2 mins [based on internet connection] to upload to server. Is there any fastest way of doing it. I'm actually fetching contacts, converting them to json array and storing into file and uploading to server.
Asked
Active
Viewed 99 times
0
-
Why are you storing in file? You can directly upload as json format and let server do their work. – Mohit Kacha Feb 27 '17 at 11:33
-
Also, just out of curiosity, are you even trying to upload the contact image by converting it into byte in your json? – Neji Feb 27 '17 at 11:35
-
Image not uploading. – chandramouli poreddy Feb 27 '17 at 11:48
-
#Mohit Kacha : for security resons I need to encode contact details. I use base 64 encoding for this. While doing conversion I am getting error that string cannot hold 800 contacts details. – chandramouli poreddy Feb 27 '17 at 11:50
-
so what is the bottleneck? slow wire? slow data access? anything else? how long does it take just to read the data without sending out? – pskink Feb 27 '17 at 12:23
-
To read all contact data and convert it to json, it takes around 30 sec - 1min (this doesn't required Internet at all) – chandramouli poreddy Feb 27 '17 at 12:48
-
1one minute? its far too slow, see: http://stackoverflow.com/a/26820544/2252830 – pskink Feb 27 '17 at 12:56
-
Thanks !pskink I searched for 1 hr but didnt find any solution, , I have to go with this. – chandramouli poreddy Feb 27 '17 at 13:05