Hello,
I'm modifying the code of my apps which use http protocol to OkHttp. Because of I'm having some troubles, have decided to use Erel's example code in order to be sure about right code.
I can't undestand where is my error when using my code instead of Erel's code:
My code:
Then, capturing data is also done with Erel's method at JobDone module:
Running the code, a handshake error is showed:
javax.net.ssl.SSLHandshakeException: Handshake failed
It's sure that the error is not related to not using user nor password. It's not necessary at all, and never used it when running the previous http protocols.
Could someone help me a bit please?
Thanks in advance.
I'm modifying the code of my apps which use http protocol to OkHttp. Because of I'm having some troubles, have decided to use Erel's example code in order to be sure about right code.
I can't undestand where is my error when using my code instead of Erel's code:
B4X:
job3.Initialize("Job3", Me)
job3.Download("https://www.b4x.com/images/b4A_bubble.png")
My code:
B4X:
job3.Initialize("Job3", Me)
job3.Download("https://www.aemps.gob.es/cima/pdfs/es/ft/57819/FT_57819.pdf")
Then, capturing data is also done with Erel's method at JobDone module:
B4X:
Dim out As OutputStream = File.OpenOutput(File.DirRootExternal, "medicine.pdf", False)
File.Copy2(job.GetInputStream, out)
out.Close '<------ very important
Running the code, a handshake error is showed:
javax.net.ssl.SSLHandshakeException: Handshake failed
It's sure that the error is not related to not using user nor password. It's not necessary at all, and never used it when running the previous http protocols.
Could someone help me a bit please?
Thanks in advance.