kommunicate-io / kommunicate-cordova-ionic-phonegap-chat-plugin Goto Github PK
View Code? Open in Web Editor NEWKommunicate plugin for Ionic/Phonegap/Cordova
License: BSD 3-Clause "New" or "Revised" License
Kommunicate plugin for Ionic/Phonegap/Cordova
License: BSD 3-Clause "New" or "Revised" License
Hello, I use this plugin to integrate my ionic project with kommunicate. On Ios it works great, but I have a problem with the Android. After I install the plugin and run ionic cordova build --release android
I get the following error Execution failed for task ':app:transformDexWithDexForRelease'
.
Do you have some ideas how I can solve this?
Hi, i'm using this plugin in an Ionic 5 app and webhooks to update my server.
Webhook is sending this info to my server :
{
"key":"message key",
"from":"sender unique id",
"groupId": 55468490,
"clientGroupId": "[email protected]_xdkcpemqpepbp8ktfmmwnuhndrl2",
"groupName": "Conversation",
"message":"message content",
"timeStamp":1457958424000, // Long timestamp value
"receiverConnected": true, // Boolean value
"receiverLastSeenAtTime": 1457958424000 //Long timestamp value
}
When I create a conversation using this code, I'm saving clientChannelKey in my server attached to the user that starts the conversation, so I can identify it when I receive a webhook.
kommunicate.conversationBuilder(conversationObject, (clientChannelKey) => {
console.log("Kommunicate create conversation successful the clientChannelKey is : " + clientChannelKey);
}, (error) =>{
console.log("Kommunicate create conversation failed : " + error);
});
After testing in iOS, I have noticed that clientChannelKey when creating conversation is the same clientGroupId that I get in weebhook. But in Android, clientChannelKey is the same groupId in webhook instead oif clientGroupId.
Is that a bug? or is intended?
Thanks!
Kommunicate Cordova Plugin is trying to call setConversationMetadata(..)
, however this method has been renamed to setConversationInfo(..)
. The conversation metadata is being read from "conversationMetadata" property. Please advise if this property will also be renamed.
if (jsonObject.has("conversationMetadata")) {
conversationMetadata = (Map<String, String>) GsonUtils.getObjectFromJson(jsonObject.getString("conversationMetadata"), Map.class);
jsonObject.remove("conversationMetadata");
}
KmConversationBuilder conversationBuilder = (KmConversationBuilder)
GsonUtils.getObjectFromJson(jsonObject.toString(), KmConversationBuilder.class);
conversationBuilder.setContext(cordova.getActivity());
conversationBuilder.setKmUser(kmUser);
conversationBuilder.setMessageMetadata(messageMetadata);
conversationBuilder.setConversationMetadata(conversationMetadata); // does not compile anymore!!
The compilation problem seems to have been caused by the gradle dependency: implementation 'io.kommunicate.sdk:kommunicateui:2.2.2'
Produced with Release: #30
I have this problem in capacitor ionic. Check Kommunicate-io/Kommunicate-Android-Chat-SDK#79 solution but not working.
I am using ionic 6 getting error
Execution failed for task ':app:processDebugMainManifest'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find io.kommunicate.sdk:kommunicateui:2.3.8.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/io/kommunicate/sdk/kommunicateui/2.3.8/kommunicateui-2.3.8.pom
- https://repo.maven.apache.org/maven2/io/kommunicate/sdk/kommunicateui/2.3.8/kommunicateui-2.3.8.pom
Please help me
Hello,
I am not able to add plugin to my ionic/cordova project. I get the following error:
Using "requireCordovaModule" to load non-cordova module "glob" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
[ERROR] An error occurred while running cordova plugin add kommunicate-cordova-plugin --save (exit code 1).
I am using ionic 3 with 9.0.0 ([email protected]).
When I rollback to Cordova 8 everything is working fine. This issue occurs only when I upgrade to Cordova 9.
I'm getting the error: Could not find io.kommunicate.sdk:kommunicateui:2.3.8.
Hi, I'm building new Ionic app.
So I decided to try to intergrate Kommunicate and compare it to Intercom.
But after I did all steps I'm getting a build error:
In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[18.0.
0]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
This is my app.gradle:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.drumvox"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 14
versionName "1.0." + versionCode
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
flatDir{
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation project(':capacitor-android')
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')
implementation 'com.google.firebase:firebase-analytics:17.4.3'
//implementation 'com.google.android.gms:play-services-gcm:17.0.0'
//implementation 'com.google.android.gms:play-services-auth:18.0.0'
//implementation 'com.google.android.gms:play-services-analytics:17.0.0'
}
apply from: 'capacitor.build.gradle'
This is my npx cap ls
:
Found 2 Capacitor plugins for android:
@codetrix-studio/capacitor-google-auth (2.1.1)
capacitor-intercom (2.1.0)
Found 16 Cordova plugins for android
cordova-plugin-androidx (1.0.2)
cordova-plugin-androidx-adapter (1.1.1)
cordova-plugin-app-version (0.1.9)
cordova-plugin-appcenter-analytics (0.5.1)
cordova-plugin-appcenter-crashes (0.5.1)
cordova-plugin-appcenter-shared (0.5.1)
cordova-plugin-cocoapod-support (1.6.2)
cordova-plugin-firebase-analytics (4.3.0)
cordova-plugin-ionic (5.4.7)
cordova-plugin-powermanagement-orig (1.1.2)
cordova-plugin-screen-orientation (3.0.2)
cordova-plugin-whitelist (1.3.4)
cordova-support-android-plugin (1.0.2)
cordova-support-google-services (1.4.0)
es6-promise-plugin (4.2.2)
kommunicate-cordova-plugin (0.4.22)
Found 2 Capacitor plugins for ios:
@codetrix-studio/capacitor-google-auth (2.1.1)
capacitor-intercom (2.1.0)
Found 11 Cordova plugins for ios
cordova-plugin-app-version (0.1.9)
cordova-plugin-appcenter-analytics (0.5.1)
cordova-plugin-appcenter-crashes (0.5.1)
cordova-plugin-appcenter-shared (0.5.1)
cordova-plugin-cocoapod-support (1.6.2)
cordova-plugin-firebase-analytics (4.3.0)
cordova-plugin-ionic (5.4.7)
cordova-plugin-powermanagement-orig (1.1.2)
cordova-plugin-screen-orientation (3.0.2)
es6-promise-plugin (4.2.2)
kommunicate-cordova-plugin (0.4.22)
Found 5 incompatible Cordova plugins for ios, skipped install
cordova-plugin-androidx (1.0.2)
cordova-plugin-androidx-adapter (1.1.1)
cordova-plugin-whitelist (1.3.4)
cordova-support-android-plugin (1.0.2)
cordova-support-google-services (1.4.0)
Is there any know conflicts? Or is there any possible solution? Thanks.
I have this plugin installed in a Ionic 5 app. It is working on iOS but on android, it throws that exception in any kommunicate function call. For example:
this.kommunicate.login(kmUser);
I have tried different methods and it's always the same error:
2020-11-18 18:11:38.273 12458-2262/com.lullaai W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] java.lang.String.getBytes()' on a null object reference
2020-11-18 18:11:38.273 12458-2262/com.lullaai W/System.err: at android.util.Base64.decode(Base64.java:120)
2020-11-18 18:11:38.273 12458-2262/com.lullaai W/System.err: at com.applozic.mobicommons.encryption.SecurityUtils.getAESKey(SecurityUtils.java:154)
2020-11-18 18:11:38.274 12458-2262/com.lullaai W/System.err: at com.applozic.mobicommons.data.SecureSharedPreferences.<init>(SecureSharedPreferences.java:39)
2020-11-18 18:11:38.274 12458-2262/com.lullaai W/System.err: at com.applozic.mobicommons.data.AlPrefSettings.<init>(AlPrefSettings.java:31)
2020-11-18 18:11:38.274 12458-2262/com.lullaai W/System.err: at com.applozic.mobicommons.data.AlPrefSettings.getInstance(AlPrefSettings.java:36)
2020-11-18 18:11:38.274 12458-2262/com.lullaai W/System.err: at com.applozic.mobicomkit.Applozic.getApplicationKey(Applozic.java:85)
2020-11-18 18:11:38.274 12458-2262/com.lullaai W/System.err: at com.applozic.mobicomkit.api.MobiComKitClientService.getApplicationKey(MobiComKitClientService.java:52)
2020-11-18 18:11:38.274 12458-2262/com.lullaai W/System.err: at com.applozic.mobicomkit.api.account.user.MobiComUserPreference.renameSharedPrefFile(MobiComUserPreference.java:107)
2020-11-18 18:11:38.274 12458-2262/com.lullaai W/System.err: at com.applozic.mobicomkit.api.account.user.MobiComUserPreference.<init>(MobiComUserPreference.java:94)
2020-11-18 18:11:38.274 12458-2262/com.lullaai W/System.err: at com.applozic.mobicomkit.api.account.user.MobiComUserPreference.getInstance(MobiComUserPreference.java:101)
2020-11-18 18:11:38.274 12458-2262/com.lullaai W/System.err: at io.kommunicate.Kommunicate.isLoggedIn(Kommunicate.java:470)
2020-11-18 18:11:38.274 12458-2262/com.lullaai W/System.err: at io.kommunicate.KmConversationHelper.createOrLaunchConversation(KmConversationHelper.java:385)
2020-11-18 18:11:38.274 12458-2262/com.lullaai W/System.err: at io.kommunicate.KmConversationBuilder.launchConversation(KmConversationBuilder.java:217)
2020-11-18 18:11:38.274 12458-2262/com.lullaai W/System.err: at io.kommunicate.phonegap.KommunicateCordovaPlugin.execute(KommunicateCordovaPlugin.java:250)
2020-11-18 18:11:38.274 12458-2262/com.lullaai W/System.err: at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
2020-11-18 18:11:38.275 12458-2262/com.lullaai W/System.err: at org.apache.cordova.PluginManager.exec(PluginManager.java:132)
2020-11-18 18:11:38.275 12458-2262/com.lullaai W/System.err: at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
2020-11-18 18:11:38.275 12458-2262/com.lullaai W/System.err: at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
2020-11-18 18:11:38.275 12458-2262/com.lullaai W/System.err: at android.os.MessageQueue.nativePollOnce(Native Method)
2020-11-18 18:11:38.275 12458-2262/com.lullaai W/System.err: at android.os.MessageQueue.next(MessageQueue.java:335)
2020-11-18 18:11:38.275 12458-2262/com.lullaai W/System.err: at android.os.Looper.loop(Looper.java:195)
2020-11-18 18:11:38.275 12458-2262/com.lullaai W/System.err: at android.os.HandlerThread.run(HandlerThread.java:67)
Any Idea?
I am trying to use kommunicate for my ionic project but it is giving me error "ReferenceError: kommunicate is not defined"
initial step: plugin installed via command "ionic cordova plugin add https://github.com/Kommunicate-io/Kommunicate-Cordova-Ionic-PhoneGap-Chat-Plugin.git"
made changes in code where on click on start conversation in event-names page the conversation should begin
my event-names.html:
<button ion-button full round (click)="showChatPage()">
Chat with Us!
my event-names.ts code
showChatPage(){
kommunicate.launchConversation((response)=>{
var vary = {
'agentId':'[email protected]',
'botId': 'livefiesta-Assistant'
};
kommunicate.startNewConversation(vary, (response) => {
var grpy = {
'groupId' : response,
'takeOrder' : true
};
console.log("Reytum Launch object : " + JSON.stringify(grpy));
kommunicate.launchParticularConversation(grpy, function(response) {
console.log("Kommunicate launch success response : " + response);
}, function(response) {
console.log("Kommunicate launch failure response : " + response);
});
console.log("Kommunicate create conversation successfull : " + response);
},(response) => {
console.log("Kommunicate create conversation failed : " + response);
});
},
(response)=>{
});
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.