android - Best way to deal with connection errors when connecting to web services -


i have android app sends , receives information vb.net web service. things great if there solid , fast internet connection otherwise, becomes shaky.

the process goes this: 1. app sends information (such id) 2. web service returns information based on id (like name) 3. app updates database within based on info sent web service.

the problem comes when internet connection weak. happens app still sends information information being received incomplete or connection timeout occurs; , app still goes step 3.

the app shouldn't updating database because transaction either incomplete or errors. ideas on how should go this?

i thinking of making sure transaction complete before updating db. web service sends sort of 'complete' signal tell app it's time update db. idea or there better way go this?

as connection timeout issue way catch that? i've seen catch timeout there other alternatives better? if connection times out happens data sent , received?

much obliged


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -