Android Question How I can trap errors using LoadBitmap?

Discussion in 'Android Questions' started by Reproretro, Jul 7, 2015.

  1. Reproretro

    Reproretro Member Licensed User

    I have a number of small images in dirassets as a sort of cache. I read the name of the required image from HTML then attempt to load it from dirassets, e.g.:
    Pic1.bitmap=LoadBitmap(File.dirassets, PicName)

    The idea being that I read it form the website only if I have to.
    How do I tell if the image already exists?
  2. Roycefer

    Roycefer Well-Known Member Licensed User

    If File.Exists(File.DirAssets, "myimage.png"Then
            Pic1.Bitmap = 
    LoadBitmap(File.DirAssets, "myimage.png")
            Pic1.Bitmap = DownloadImage
    End If
    Reproretro likes this.
  3. Reproretro

    Reproretro Member Licensed User

    Thank you.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice