Advanced

Mirrorfly React Native UIKit is a set of prebuilt UI Widgets that allows you to easily integrate every widgets inside your application to acheive all the essential messaging features.

Registration#

Use the below method to register a user in sandbox Live mode.

Unless you log out the session, make a note that should never call the registration method more than once in an application
const registerResponse = await mirrorflyRegister({
userIdentifier: '917********4',
});

Example Response#

{
"jid": "917********4@domain",
"message": "Login Success",
"statusCode": 200
}
ArgumentTypeDescription
USER_IDENTIFIERStringA Unique Id to Register the User. We accept only the AlphaNumeric String

Note : Unique ID assigned for each user Ex: 12345678 (any alphanumeric). The below characters is not allowed in userId: U+0022 (") U+0026 (&) U+0027 (') U+002F (/) U+003A (:) U+003C (<) U+003E (>) U+0040 (@) userID should follow below specification: https://xmpp.org/extensions/xep-0106.html

Display Recent Chat list#

Recent Chat Widget is the starting point for launching React Native UIKit in your application. By implementing the code below, you will see a complete list of recent chats that you're made with single conversation.

Note : Use Recent Chat Widget only when you have done the registration.

import { ChatApp } from "mirrorfly-uikit-react-native"
function YourComponent() {
return (
<ChatApp jid={jid}/>
);
}
export default YourComponent;