Android Question XMPP Library Wrapper

lip

Active Member
Licensed User
Longtime User
I'm trying to wrap the smack library, with some help from a java expert who knows very little about B4A. I know B4A but I know next to nothing about Java or wrapping libraries. I've asked for help in the Libraries forum but not had any response so forgive me if this is in the wrong place.

The Library so far is attached.. There are also a number of associated .jar files (too big to attach to this post) which I have copied into the AdditionalLibraries folder but not referenced in the Manifest.

When I compile it the B4A line
B4A:
objXmpp.Initialize("objXmpp")
throws the error below.

I'm not sure if I need include a reference to the .jar files in the manifest? Or do I need to do something with Jetifier? Or something else?!?

If I include a reference to the .jar then I get a different error: (Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)

B4A Version: 11.00
Parsing code. (0.00s)
Java Version: 11
Building folders structure. (0.01s)
Compiling code. (0.01s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Compiling resources (0.06s)
Linking resources (0.25s)
Compiling generated Java code. Error
B4A line: 54
objXmpp.Initialize(\
src\com\visualnet\xmpptest\main.java:358: error: cannot access MessageListener
_objxmpp.Initialize(processBA,"objXmpp");
^
class file for org.jivesoftware.smack.MessageListener not found
 

Attachments

  • LiteIP.zip
    7.2 KB · Views: 275
Last edited:
Top