disable httpClient_responseSucess


Active Member
Licensed User

I have a strange "problem". I don't want to track the responseSucess Event because I don't care much if the http query will be processed correctly or not. If you are interested - it's kinda Trial mode however mine is for statistics purposes and doesn't limit the use of applications.

So, I have a Code Module called Track

Sub CallHome(mode As String, additional As String)


If(Common.InternetEnabled) Then

Dim final_string, params As String

params = createUserData(mode, additional)

final_string = Common.activation_link & params


    Common.httprequest1.Timeout = 50000
    If Common.HttpClient1.Execute(Common.httprequest1, 1) = False Then
       Return False
    End If
   Return False
   End If
   If(Common.debug_mode) Then
      Common.LogT("Call Home: " & LastException, "")
   End If
      Return False
   End Try
   Return True
End Sub

My problem is that there is no way to disable the responseSuccess event. I dunno why but B4A is still searching for it even if I pass "" as a parameter. The result java error reffers to the method "_responseSuccess" without any prefix variable.

I succeed in tricking B4A by defining httpClient11 as a Global Variable at every Activity module I have a call to Track.CallHome. Then, I just implement a blank httpClient1_responseSuccess event which does the trick.

I am not sure what would happen If we disable these java errors but they are very useful.

Erel, my two cents, check out this "bug" please.


Active Member
Licensed User
You seem right, I have missed that. It was intended for use if I am to check the execution status but I simply don't care about the status. Actually the Tracker module became quite good. It does exactly what it should. It reports application opens, add clicks and websitr redirects to my backend. If you are interested, I can share the source code. It is you that inspired me with your efforts. Tomas(XVer....)s example was using his AdvancedCamera library and wasn't applicable. Mine is inside a code module.

Sent from my HTC Desire using Tapatalk
Upvote 0