Can I use Smack in flutter?

Can i use Samck in flutter?If will,how should i do ,like Android?

Hello,

To the best of my knowledge it is a no.

Flutter is a toolkit for developing mobile (and now also desktop) applications in Dart. It has its own dependency system, and it doesn’t appear to be compatible with Java or Kotlin.

Dart has its own toolchain, and its own libraries, the only thing I could find which would give you some compatibility is if you used JNI, but this is highly unadvised.

TL;DR you will need to find a implementation of the XMPP protocol in the Dart programming language in order to use it with Flutter. You will need to use plain old Java or Kotlin if you want to develop an android app with Smack.

Hope this helps :slight_smile:

1 Like

The XMPP website lists XMPP libraries for a wide range of environments. Maybe there’s something I’m there that suits your requirements: XMPP | XMPP Software

For some of these, the Openfire documentation contains some examples on how to get minimalistic connection going, like this one for Moxxmpp: moxxmpp: A Minimal Working Example (in Dart)

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.