Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@essent/nativescript-iadvize

Package Overview
Dependencies
Maintainers
70
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@essent/nativescript-iadvize - npm Package Compare versions

Comparing version 2.9.1 to 2.9.2-alpha.0

1

index.android.d.ts

@@ -6,2 +6,3 @@ import { ChatConfiguration, IAdvizeCommon } from './common';

static getInstance(): IAdvize;
private static targetingListener;
private buildGdprOption;

@@ -8,0 +9,0 @@ activate(projectId: number, userId: string, legalUrl: string | undefined, onSuccess: () => void, onFailure: () => void): void;

31

index.android.js

@@ -25,2 +25,3 @@ import { IAdvizeCommon } from './common';

instance = new IAdvize();
IAdvize.initiate();
}

@@ -38,3 +39,2 @@ return instance;

activate(projectId, userId, legalUrl = undefined, onSuccess, onFailure) {
IAdvize.initiate();
const gdprOption = this.buildGdprOption(legalUrl);

@@ -61,13 +61,19 @@ com.iadvize.conversation.sdk.IAdvizeSDK.activate(projectId, new com.iadvize.conversation.sdk.feature.authentication.AuthenticationOption.Simple(userId), gdprOption, new com.iadvize.conversation.sdk.IAdvizeSDK.Callback({

}
const listeners = IAdvizeSDK().getTargetingController().getListeners();
listeners.add(new com.iadvize.conversation.sdk.feature.targeting.TargetingListener({
onActiveTargetingRuleAvailabilityUpdated(param0) {
console.log('iAdvize[Android] Targeting rule available - ' + param0);
IAdvize.activateChatbot();
},
}));
if (!IAdvize.targetingListener) {
const listeners = IAdvizeSDK().getTargetingController().getListeners();
IAdvize.targetingListener = new com.iadvize.conversation.sdk.feature.targeting.TargetingListener({
onActiveTargetingRuleAvailabilityUpdated(param0) {
console.log('iAdvize[Android] Targeting rule available - ' + param0);
if (param0) {
IAdvize.activateChatbot();
return;
}
IAdvize.deactivateChatbot();
},
});
listeners.add(IAdvize.targetingListener);
}
const language = com.iadvize.conversation.sdk.type.Language.class.getDeclaredField('nl').get(null);
IAdvizeSDK().getTargetingController().setLanguage(new com.iadvize.conversation.sdk.feature.targeting.LanguageOption.Custom(language));
IAdvizeSDK().getTargetingController().activateTargetingRule(this.buildTargetingRule(targetingRuleUUID));
IAdvize.activateChatbot();
}

@@ -135,6 +141,6 @@ logout() {

dismissChat() {
const isChatActivity = Application.android.foregroundActivity instanceof com.iadvize.conversation.sdk.feature.chatbox.ChatboxActivity;
if (isChatActivity) {
Application.android.foregroundActivity.finish();
if (!IAdvizeSDK()) {
return;
}
IAdvizeSDK().getChatboxController().dismissChatbox();
}

@@ -180,2 +186,3 @@ registerPushToken(token, _isProd) {

}
IAdvize.targetingListener = null;
//# sourceMappingURL=index.android.js.map

@@ -41,6 +41,12 @@ import { Color, ImageSource } from '@nativescript/core';

activateTargetingRule(targetingRuleUUID) {
this.targetingRuleDelegate = TargetingControllerDelegateImpl.initWithCallbacks((isActiveTargetingRuleAvailable) => {
console.log('iAdvize[iOS] Targeting rule available - ' + isActiveTargetingRuleAvailable);
IAdvize.activateChatbot();
});
if (!this.targetingRuleDelegate) {
this.targetingRuleDelegate = TargetingControllerDelegateImpl.initWithCallbacks((isActiveTargetingRuleAvailable) => {
console.log('iAdvize[iOS] Targeting rule available - ' + isActiveTargetingRuleAvailable);
if (isActiveTargetingRuleAvailable) {
IAdvize.activateChatbot();
return;
}
IAdvize.deactivateChatbot();
});
}
IAdvizeSDK.shared.targetingController.delegate = this.targetingRuleDelegate;

@@ -47,0 +53,0 @@ IAdvizeSDK.shared.targetingController.setLanguage(SDKLanguageOption.customWithValue(119 /* GraphQLLanguage.Nl */));

{
"name": "@essent/nativescript-iadvize",
"version": "2.9.1",
"version": "2.9.2-alpha.0",
"description": "iAdvize plugin for NativeScript.",

@@ -5,0 +5,0 @@ "main": "index",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc