Android Question Trapping error if image is not loadable.

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi Guys,

I am trying to load images thru LoadBitMapSample. Sometimes the file is not completely downloaded or for some reason the file is not loading it shows error "Error loading Bitmap" and crashes.
Can we trap this error so that we can manage it?

Also I am using MediaBrowser library for generating thumbnail. Is there any other way we can generate even smaller size Thumbnail so it gets downloaded faster?

Please guide me.

Thanks
Juzer
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
B4X:
    Try
        'code that load bitmap sample which might be corrupted
    Catch
        Log(LastException)
        'perhaps inform user of error through msgbox or any other means .
    End Try
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…