B4J Question OkHttpUtils2 and SMMTelebot

noxius3

Member
When you create a NonUI application, there is a conflict between the OkHttpUtils2 library and SMMTelebot,
(JTelegramBot cannot use, it does not receive messages from the channel and does not have event sent_message).
OkHttpUtils2 does not execute a Get request.
In the log, errors do not appear.
The Post request works. In the B4XPages application, the code works correctly. Server mode configured,
Does not work. If I disable the smmtelegram library, everything starts working right away.
B4J 9.80 (64) Java 11.0.14
 

DonManfred

Expert
Licensed User
Longtime User
you can try to edit the libary xml and remove the dependsOn-Lines.
For a nonui i gues you have to add okhttputils2 for nonui.

I never used this library tough.

B4X:
    <dependsOn>java-telegram-bot-api-4.6.0</dependsOn>
you should leave in there...
 
Upvote 0

noxius3

Member
I probably incorrectly explained the essence of the problem.
Here is a small program for testing. It doesn't work if the SMMTelebot library is added.
If I disable the library, then everything starts working right away. Moreover, the same code works correctly on windows 7 (32) B4 9.30 Java 11

This code is not executed. No errors appear.
B4X:
       Dim j As HttpJob
        j.Initialize("ww", Me)
        j.Download("https://google.com")
        Wait For (j) JobDone (j As HttpJob)
         If j.Success Then
             Log(j.GetString)
            Log("Success")
         End If
         j.Release

Sorry for bad English.
 

Attachments

  • HttpTest.zip
    72.8 KB · Views: 73
Upvote 0
Top