iOS Question save to gallery

soroush_safarii

Member
Licensed User
hello
i wrote code to receive url then show and save to gallery
but when i start and paste url to text field , app show image but don't save to gallery and crash
what is worng ?
@Erel
 

Attachments

  • dw.zip
    39.5 KB · Views: 209

soroush_safarii

Member
Licensed User
Please don't limit your questions to a single member. I will not answer such questions.

You should also post the relevant source code in the post itself and add the error message from the logs.

i'm sorry for this
but in log section , b4i don't show any error
in other to , i don't receive any error in log menu , only app crash and don't save image in gallery
 
Upvote 0

soroush_safarii

Member
Licensed User
i clear my code and fix it ,
now see when click on save button , application crash and dont show any error and don't save to gallery
and url like this : https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_160x56dp.png
i so sorry , i am beginner ,
 

Attachments

  • dw1.zip
    78.8 KB · Views: 211
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. Always make a new Httpjob for each request.
2. You should set the job name by calling Job.Initialize.

This code works:
B4X:
Sub btn_Click
   Dim h1 As HttpJob 'no need to make it a global variable
   h1.Initialize("dnimg", Me)
   h1.Download("https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_160x56dp.png")
End Sub
 
Upvote 0

soroush_safarii

Member
Licensed User
i have problem with save to gallery ,
this code you post ,for download.

for save image to gallery , what i do ?
i write code but app crash and dont show any error
@Erel
 
Last edited:
Upvote 0

soroush_safarii

Member
Licensed User
thank you erel , you are the best
i sorry sometime i do wrong , such as i start conversation to you or limit my question to you and etc ,
best regard for you
its solved
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…