I’ve a process to send an image to server as per client/end-user wish(pick) from gallery and upload. But the task is to send an image file from an application, even-though user don’t have an internet connection and it should send a file when he/she get it(internet connection again/back). I request you people to suggest some idea and it will helpful if I get snippet of code/sample. Thank you!
Share
You can try the following:
Make an android service which gets started when application tries to send files but internet is not available.
Android service will wait for internet connectivity availability.
Store the http url and image uri for every upload request made during this time in SharedPreference.
When network becomes available fetch upload request from shared preference and make request one by one.
Hope this helps.