Android Question Linking to website Image

brianwiz12

Active Member
Licensed User
Longtime User
Hello,

Trying to cut down on the size of one of my apps. Trying to put all images on a website and do If/Then statement.


B4X:
    Case "Episode S1E2"
            If File.Exists(File.DirRootExternal,"http://www.ultimatetvtrivia.com/images/abby/s1e2.png") Then
                SlidingPuzzleView1.ImageDrawable=LoadBitmap(File.DirRootExternal, "http://www.ultimatetvtrivia.com/images/abby/s1e2.png")
            Else
            SlidingPuzzleView1.ImageDrawable=LoadBitmap(File.DirAssets,"s1e1.png")
            lblwelcome.SendToBack
            End If

It returns only the S1E1.png. Even thouogh s1e2.png is ont he site. Now i have went through file.(all options) cant seem to get one that will work
 

brianwiz12

Active Member
Licensed User
Longtime User
Thank you.. I found the job walk through to downloading an image. But it seems not to work with a customer puzzle view

B4X:
Case "Episode S1E2"
            Dim Job As HttpJob
            Job.Initialize("image",Me)
            Job.Download("http://www.ultimatetvtrivia.com/images/abby/s1e2.png")
            Job.JobName = "s1e2"
            If Job.Success Then
                SlidingPuzzleView1.ImageDrawable = LoadBitmap(file.DirAssets, Job.GetBitmap)
                lblwelcome.SendToBack
            Else
            SlidingPuzzleView1.ImageDrawable=LoadBitmap(File.DirAssets,"s1e1.png")
            lblwelcome.SendToBack
            End If
 
Upvote 0
Top