Android Question Loading Image loads cached image

walterf25

Expert
Licensed User
Longtime User
Hi all, not sure if this is a real issue or I'm not handling this properly, but I have the following code inside the B4XPage_Appear function

Loading Images:
Sub B4XPage_Appear
    LogColor("B4XPage_Appear OnboardingSteps...", xui.Color_Red)
    imgMain.setBitmap(LoadBitmap(rp.GetSafeDirDefaultExternal(""), "frontpic.png"))
    imgMainShoulders.SetBitmap(LoadBitmap(rp.GetSafeDirDefaultExternal(""), "frontpic.png"))
    imgMainHips.SetBitmap(LoadBitmap(rp.GetSafeDirDefaultExternal(""), "frontpic.png"))
    imgMainSideHeight.SetBitmap(LoadBitmap(rp.GetSafeDirDefaultExternal(""), "sidepic.png"))
    imgeyeheight.SetBitmap(LoadBitmap(rp.GetSafeDirDefaultExternal(""), "sidepic.png"))
    imgMainElbowHeight.SetBitmap(LoadBitmap(rp.GetSafeDirDefaultExternal(""), "sidepic.png"))
    imgMainLumbarHeight.SetBitmap(LoadBitmap(rp.GetSafeDirDefaultExternal(""), "sidepic.png"))
    imgMainButtocksHeight.SetBitmap(LoadBitmap(rp.GetSafeDirDefaultExternal(""), "sidepic.png"))
    imgMainKneeHeight.SetBitmap(LoadBitmap(rp.GetSafeDirDefaultExternal(""), "sidepic.png"))
End Sub

The front.png and sidepic.png images are being saved when the user takes an image either with the front or back camera.

The issue I am seeing is that if the user goes back to retake a picture and comes back to this page, for some reason the new images are not being loaded, instead it seems that the cached image is being used, why is this and how can I force the new images to be loaded rather than whatever previous images were taken.

I have verified and the new images are in fact being saved in the app's packagename directory every time, so I don't understand why the cached images are loaded everytime the user goes back to this OnboardingSteps page.

Any thoughts?

Walter
 

walterf25

Expert
Licensed User
Longtime User
Appear This event is triggered every time the front and rear switches.
The pictures are taken on a completely different page, I don't understand your comment.
 
Upvote 0
Top