2.14.4 • Published 5 months ago

@essent/nativescript-iadvize v2.14.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

@essent/nativescript-iadvize

A NativeScript plugin for integration of iAdvize chat into Android/iOS app.

npm version

This is a plugin to show the conversation from a iAdvize chat, using the iAdvize SDK (Android v2.2.2, iOS v2.2.5).

Requirements

  • iOS 12.0 or higher, and Xcode 12.5
  • Minimum Android Version API 19, and Kotlin 1.5.10
  • NativeScript CLI 7.x
  • iAdvize account

Installation

Run the following command from the root of your project:

npm install @essent/nativescript-iadvize

Activation

When the user logs in to the your app call activate with your credentials (our example home.component.ts):

IAdvize.activate(XXXX, 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', 'userId', () => {
  console.log('IAdvize conversation activated.');
});

Chatting

To open the chat window call presentChat():

IAdvize.presentChat();

Optional functions

Hide default chat button

To hide default chat button call hideDefaultChatButton():

IAdvize.hideDefaultChatButton();

UI customization

To customize the chatbox UI call customize():

const configuration: ChatConfiguration = {
  automaticMessage: 'Any question? Say Hello to Smart and we will answer you as soon as possible! 😊',
  font: 'fontPath',
  incomingMessageAvatar: 'avatar-icon',
  mainColor: '#4103fc',
  navigationBarBackgroundColor: '#4103fc',
  navigationBarMainColor: '#ffffff',
  navigationBarTitle: 'Chat Title',
};
IAdvize.customize(configuration);

Logging Out

To preserve the confidentiality of user conversation call logout().

IAdvize.logout();

Conversation events

To add a listener to be informed in real time about conversation events call registerConversationListener().

IAdvize.registerConversationListener(
  (url: string) => {
    console.log('Handle clicked url - ' + url);
    return false;
  },
  (hasOngoingConversation: boolean) => {
    console.log('Ongoing conversation status changed - ' + hasOngoingConversation);
  }
);

Push Notifications

To be informed of chat messages received when your app is not running call registerPushToken()

IAdvize.registerPushToken('your-token', isProduction);
2.11.6

8 months ago

2.11.5

8 months ago

2.13.0

7 months ago

2.13.1

7 months ago

2.10.1-alpha.0

10 months ago

2.10.1

10 months ago

2.14.0-alpha1

7 months ago

2.13.0-alpha.1

7 months ago

2.13.0-alpha.0

7 months ago

2.14.3

6 months ago

2.14.4

5 months ago

2.14.1

6 months ago

2.14.2

6 months ago

2.14.0

6 months ago

2.10.0

11 months ago

2.10.0-alpha1

11 months ago

2.10.0-alpha0

11 months ago

2.9.3

12 months ago

2.9.3-alpha.3

12 months ago

2.9.3-alpha.1

12 months ago

2.9.3-alpha.0

12 months ago

2.9.2-alpha.0

12 months ago

2.9.2

1 year ago

2.9.2-alpha.1

1 year ago

2.9.1

1 year ago

2.9.0-alpha.10

1 year ago

2.9.0-alpha.9

1 year ago

2.9.0

1 year ago

2.9.0-alpha.3

1 year ago

2.9.0-alpha.2

1 year ago

2.9.0-alpha.1

1 year ago

2.9.0-alpha.0

1 year ago

2.4.0

1 year ago

2.4.0-alpha.1

1 year ago

2.4.0-alpha.0

1 year ago

2.0.0-alpha.3

2 years ago

2.0.0-alpha.2

2 years ago

2.0.0-alpha.1

2 years ago

2.0.0-alpha.0

2 years ago

2.3.0-beta.2

2 years ago

2.3.0-beta.1

2 years ago

2.3.0-beta.0

2 years ago

2.2.0

2 years ago

2.1.0

2 years ago

2.1.0-alpha.6

2 years ago

2.1.0-alpha.5

2 years ago

2.1.0-alpha.4

2 years ago

2.1.0-alpha.3

2 years ago

2.1.0-alpha.2

2 years ago

2.1.0-alpha.1

2 years ago

2.1.0-alpha.0

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago