c# - Windows Phone 8.1 Image Async Not Updating -


i trying read image async web server. works first time, after next call image blinks , nothing happens.

i tried other approaches got same result.

how can update image properly?

public async void readnextphoto(image image)     {         // getimage returns random string image url         var uri = new uri("http://example.com/getimage.php");         var httpclient = new httpclient();          // catch network exceptions async methods         try         {             var result = await httpclient.getstringasync(uri);              var bi = new bitmapimage(new uri(result));              image.source = bi;         }         catch         {             // details in ex.message , ex.hresult.                }      } 

thank you, jonathan

edit: answer getimage.php string actual image example.com/random_image_01.jpg

edit2: problem in httpclient, returns same string. cache maybe?

in httpclient cache enabled default. far know, way rid of pass random parameter, looks different request , doesn't exist in cache.

var uri = new uri("http://example.com/getimage.php?no-cache=" & datetime.now.ticks.tostring()); 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -