imgsimonebiliato Well-Known Member Licensed User Longtime User Jul 16, 2013 #1 Hi, I need to get HttpClient_ResponseSuccess/Error from a library. I know that this method can't be call from a libray, and I need to execute this several times in different program. What can I use? Thank
Hi, I need to get HttpClient_ResponseSuccess/Error from a library. I know that this method can't be call from a libray, and I need to execute this several times in different program. What can I use? Thank
Erel B4X founder Staff member Licensed User Longtime User Jul 16, 2013 #2 Why do you need to handle it from a library? It will be much easier to write the communication code in Basic4android directly. Upvote 0
Why do you need to handle it from a library? It will be much easier to write the communication code in Basic4android directly.
imgsimonebiliato Well-Known Member Licensed User Longtime User Jul 16, 2013 #3 Erel said: Why do you need to handle it from a library? It will be much easier to write the communication code in Basic4android directly. Click to expand... Because the library is used in 10 different programs, and they need to do the same thing at the start Upvote 0
Erel said: Why do you need to handle it from a library? It will be much easier to write the communication code in Basic4android directly. Click to expand... Because the library is used in 10 different programs, and they need to do the same thing at the start
Erel B4X founder Staff member Licensed User Longtime User Jul 17, 2013 #4 Are the other 10 programs B4A programs? If yes then you can compile the B4A code to a library and reuse it. Upvote 0
Are the other 10 programs B4A programs? If yes then you can compile the B4A code to a library and reuse it.
imgsimonebiliato Well-Known Member Licensed User Longtime User Jul 17, 2013 #5 Is what I'm trying to do! But in the code there is also a hc_responsesuccess/error :sign0148: Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jul 17, 2013 #6 Are you writing the library in Java or B4A? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jul 17, 2013 #8 There is no problem with handling these events from a library written with B4A. Though it will be easier to use HttpUtils2. Upvote 0
There is no problem with handling these events from a library written with B4A. Though it will be easier to use HttpUtils2.
imgsimonebiliato Well-Known Member Licensed User Longtime User Jul 17, 2013 #9 But if I create an event hc_ResponseSuccess and hc_ResponseError, the program goes in error Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jul 17, 2013 #10 Which error do you get? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jul 17, 2013 #11 Which line raises this error? Why don't you use HttpUtils2? It will be much simpler. Upvote 0
imgsimonebiliato Well-Known Member Licensed User Longtime User Jul 17, 2013 #12 The line that raise this error is number 509. I never used HttpUtils2 Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jul 17, 2013 #13 There are no line numbers in the code you posted. You can learn more about HttpUtils2 here: http://www.b4x.com/forum/showthread.php?p=109068 Upvote 0
There are no line numbers in the code you posted. You can learn more about HttpUtils2 here: http://www.b4x.com/forum/showthread.php?p=109068
imgsimonebiliato Well-Known Member Licensed User Longtime User Jul 17, 2013 #14 The line is where it is write: stream.InitializeToBytesArray(1) Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jul 17, 2013 #15 The error message says that the error is in main_jsonstream_streamfinish. You should run your code in Debug mode to see the line. Upvote 0
The error message says that the error is in main_jsonstream_streamfinish. You should run your code in Debug mode to see the line.
imgsimonebiliato Well-Known Member Licensed User Longtime User Jul 19, 2013 #16 Hi Erel, I tried to use a class module and I solved the problem Please, how can I get a return value, from a class? Upvote 0
Hi Erel, I tried to use a class module and I solved the problem Please, how can I get a return value, from a class?
Erel B4X founder Staff member Licensed User Longtime User Jul 19, 2013 #17 Do you want to return a value after JobDone event? In that case you can use CallSub or CallSubDelayed to send the result to the target. Upvote 0
Do you want to return a value after JobDone event? In that case you can use CallSub or CallSubDelayed to send the result to the target.
imgsimonebiliato Well-Known Member Licensed User Longtime User Jul 19, 2013 #18 Where I can find HttpJob? Because I don't use HttpUtils2. Are there any other methods? Last edited: Jul 19, 2013 Upvote 0