I have used Volley to post data.but if i dont have any internet connection on right time i cannot post data into server.Is there any way to post data automatically when internet gets connected to a mobile.
Asked
Active
Viewed 465 times
0
-
may be you can use a broadcast receiver to notify you when internet has been connected , and then you can use job scheduler to complete the job – Aman Grover Jul 14 '17 at 06:35
-
Check this : https://stackoverflow.com/a/26114247/4665938 – Rakshit Nawani Jul 14 '17 at 06:37
-
you can add broadcast receiver for network or you can set max retry of volley after every 20sec – Avinash Jul 14 '17 at 06:56
-
no, there is no way to do that automatically, You have to firstly detect that there is an internet connection (it is easy to implement, just google for it), and then you should re-send your request. – Vladyslav Matviienko Jul 14 '17 at 07:06
-
@AmanGrover do you have any example application. – Aiyappa Jul 14 '17 at 07:16