Android Question Error loading bitmap using httpjob

awakenblueheart

Member
Licensed User
Longtime User
I am using below link library.
HTML:
<a href="https://www.b4x.com/android/forum/threads/httputils2-web-services-are-now-even-simpler.18992/" target="_blank" class="externalLink">HttpUtils2</a>

Attached with uploaded project file modified from above library.

Answer:
1.The modules already there when I open the Httputils2 library sample project.
2. Image link = "http://www.kipidap.web44.net/image/" which in Map Activity.
(image type: jpeg)

Is it possible to download image and save in specific folder like
1.in SD card ?
2.Internal Directory for apps ?
If possible, guide me. Thanks Erel.
 

Attachments

  • HttpUtils2.zip
    480 KB · Views: 154
Last edited:
Upvote 0

awakenblueheart

Member
Licensed User
Longtime User
Sorry, I thought the HTML link will appear as HttpUtils2 hyperlink. My bad...
 
Upvote 0

awakenblueheart

Member
Licensed User
Longtime User
I managed to solve my issue. The problem with my code is the image link "http://www.kipidap.web44.net/image/" content many images.
I am downloading them all one time.
So, I change a bit by calling the method to download my image one by one.
Example: "http://www.kipidap.web44.net/image/book.jpg" then
"http://www.kipidap.web44.net/image/book2.jpg".

The problem now is when my phone change orientation I need to download them again.

So, I think there is a way to save downloaded image in directory.

Please, any help ???
 
Upvote 0

awakenblueheart

Member
Licensed User
Longtime User
Finally, successfully, to save the downloaded image.

Here is the code I used:

Dim Out As OutputStream
Out=File.OpenOutput(File.DirDefaultExternal,text,False)
bmps(ImageIndex).WriteToStream(Out,67,"JPEG")
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…