Is mesibo chat and calling api available for flutter technology

498 Views Asked by At

I want to use Mesibo Api for chat and calling feature in app. I have developed the app in flutter. Is Mesibo api available for flutter sdk?

2

There are 2 best solutions below

0
On

mesibo APIs are provided as a Native SDK for Android, iOS, and Web. Since all the cross-platform tools offer a way to access native APIs, you can use mesibo from the platform of your choice.

You can read more here Using mesibo with Cross-Platform Application Development Tools like Flutter, React-Native, Swift, Ionic, etc.

and also reference flutter source code https://github.com/mesibo/samples/tree/master/flutter

0
On

You can check https://github.com/fxjordan/flutter_mesibo.

It's a tiny wrapper around the Mesibo iOS and Android SDKs, which saves you from using the Flutter platform channels directly.

Also, there are some additions to the original API that make it more handy to handle messages 'the flutter way', e.g., you can subscribe to a Stream of incoming messages.

Disclaimer: I'm the author of this library.

Here is some example code:

Future<void> initChat() async {
  // Get Mesibo instance
  Mesibo mesibo = Mesibo.instance;
  // you can copy an access token from Mesibo console for testing
  await mesibo.setAccessToken('users access token');
  await mesibo.start(); 
  

  /*
   * Listen for incoming messages.
   *
   * You can send a text message from the Mesibo console to the user
   * from which you copied the access token.
   */
  mesibo.realTimeMessageStream.listen(_handleNewMessage);
}

void _handleNewMessage(MesiboMessage message) {
  // read message data as string
  final messageText = utf8.decode(message.data);

}