Git Product home page Git Product logo

kommunicate-android-chat-sdk's Introduction

Kommunicate Android Chat SDK for Customer Support

An Open Source Android SDK for enabling AI Chatbot and Live Chat into your App

Overview

Kommunicate provides open source live chat SDK in android. The Kommunicate SDK is flexible, lightweight and easily integrable. It lets you easily add real-time live chat and in-app messaging in your mobile applications and websites for customer support. The SDK is equipped with advance messaging options such as sending attachments, sharing location and rich messaging.

Kommunicate SDK lets you integrate custom chatbots in your mobile apps for automating tasks. It comes with multiple features to make it a full-fledged customer support SDK.

Get Started

To get started with Kommunicate Android SDK, head over to the Kommunicate website and Signup to get your Application ID.

This is a sample that implements the Kommunicate android chat SDK. To use this sample you need to provide your application ID in app level build.gradle file's defaultConfig Refer here. Replace <Your-APP_ID> with the application ID obtained from Kommunicate dashboard.

Build a BOT on Kommunicate and integrate it in your Android app

Kompose

Kompose is a Kommunicate’s bot builder that help you in building your own bot, a techie, non-techie, or a person who doesn’t have any idea about chatbots can also build the bot. Anyone can create a chatbot with the Kompose without any assistance.

Kompose-build

Following is the UI to create the BOT

Kompose

Dialogflow chatbot integration in your Android app

Dialogflow is a Google-owned NLP platform to facilitate human-computer interactions such as chatbots, voice bots, etc.

Kommunicate's Dialogflow integration provides a more versatile, customizable and better chatting experience. Kommunicate Android Live Chat SDK supports all of Dialogflow's features such as Google Assistant, Rich Messaging, etc. On top of that, it is equipped with advanced features such as bot-human handoff, conversation managing dashboard, reporting, and others.

You can connect your Dialogflow chatbot with Kommunicate in the following 4 simple steps. Here is a step by step blog to add Kommunicate SDK in your Android app.

Step 1: Get your API credentials from Dialogflow

  • Login to Dialogflow console and select your agent from the dropdown in the left panel.
  • Click on the settings button. It will open a setting page for the agent.
  • Inside the general tab search for GOOGLE PROJECTS and click on your service account.
  • After getting redirected to your SERVICE ACCOUNT, create a key in JSON format for your project from the actions section and it will get automatically downloaded.

Step 2: Create a free Kommunicate account

Create a free account on Kommunicate and navigate to the Bots section.

Step 3: Integrate your Dialogflow chatbot with Kommunicate

  • In the Bot integrations section, choose Dialogflow. A popup window will open.
  • Upload your Key file here and proceed.
  • Give a name and image to your chatbot. It will be visible to the users chatting with your chatbot.
  • Enable/Disable chatbot to human handoff. If enabled, it will automatically assign conversations to humans in case the chatbot is not able to answer.

Step 4: Install the Kommunicate Android SDK to your app

You can add the Kommunicate SDK in your Android app easily. More information on how to integrate with your Andriod app here.

Note: Here's a sample chatbot for you to get started with Dialogflow.

Other Features

Live chat widget: Make it easier for your visitors and users to reach you with an instant website and in-app support through chat. The widget is highly customizable.

Chatbots: Automate and speed up your customer service by integrating AI-powered chatbots. Build your chatbots and deploy them using Kommunicate and seamlessly add them in the live chat.

Conversations: Manage all your customer queries coming from the live chat plugin. Easily manage and assign agents to cater to user conversations.

Dashboard: A powerful dashboard to see, analyze and act upon your customer conversation data. Helps you analyze the performance of support agents as well.

Helpcenter: Create your knowledge base and deploy on a dedicated page to cater to generic and recurring customer queries. Your customers will also be able to directly access FAQs in chat.

Mailbox: A simple and powerful team inbox for ticketing, managing, receiving and replying to all your customer support emails.

Integrations: Easily move data between Kommunicate and your other favorite apps. Integrate your favorite CRM, knowledge base software and other apps.

Conversation Routing: Select routing rules for incoming conversations for both your agents and bots. Choose between automatic assignments or to notify all.

Smart Rich Messaging: Leverage rich messages using buttons, cards, carousels, forms or lists to provide an exquisite support chat experience to your customers.

Quick Replies: Quickly respond to generic user queries using Quick Replies. Easily create and manage templated messages from your dashboard.

Technical Documentation

Detailed instructions for installing, configuring and customizing the Kommunicate Android SDK are availble here.

kommunicate-android-chat-sdk's People

Contributors

ab14bhardwaj avatar abhijeetranjan308 avatar amntoppo avatar amntoppokm avatar archit2602 avatar devashishmamgain avatar harishbala1o avatar himanshu-kt avatar joshi-kt avatar kandpal025 avatar mukeshthawani avatar pahadi777 avatar parthsh avatar poojagc avatar pranaysaini04 avatar rajeev-kommunicate avatar reytum avatar sathyan-e avatar sathyan-elangovan avatar sathyan-km avatar shivani1991 avatar shubhamtewari avatar spongycode avatar sunilkumarr avatar surajkukkipady18 avatar vipinsonu1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kommunicate-android-chat-sdk's Issues

Disable location permission

Hello,

I have integrated Kommunicate in my app, but when publishing the application, I got an error:

You have declared that your app targets under 13 age groups, but your app asks for location permissions.: b'{\n "error": {\n "code": 403,\n "message": "You have declared that your app targets under 13 age groups, but your app asks for location permissions.",\n "status": "PERMISSION_DENIED"\n }\n}\n'

My app is for kids, and I want to integrate Kommunicate so I can reach the parents easily.

BTW I'm using Flutter plugin where it uses this sdk and iOS SDK as I know.

Any idea to resolve this, please?

Issue while launching conversation

I get following error while launching conversation :
Registration response is: {"message":"PASSWORD_INVALID","currentTimeStamp":1618334956706,"deactivate":false,"totalUnreadCount":0,"metadata":{},"newUser":false}

My code :

 fun openConversation(context: Activity, onLoading: ((isLoading:Boolean) -> Unit)?=null, onError:((error:Throwable?, showError:Boolean)->Unit)?=null) {
        var messageMetaData=  mutableMapOf<String, String>()
        var sessionId= MyApplication.instance?.preferencesManager?.getSessionId()
        var userId=MyApplication.instance?.preferencesManager?.getCachedUser()?.customer_id
        var emailId=MyApplication.instance?.preferencesManager?.getCurrentUserEmail()
        var suite=MyApplication.instance?.preferencesManager?.getCachedUser()?.suite
        if(!(validateCredentials(userId,emailId,suite))){
            onError?.invoke(null, true)
            return
        }
        onLoading?.invoke(true)
        var user = KMUser()
        user.userId= userId
      //  user.userName=suite
        user.email = emailId
        user.password=APPConstants.KOMMUNICATE_PASSWORD
        messageMetaData.put("defaultMessageMetaData","{\"userId\":\""+sessionId+"\"}")
        var kmConversationBuilder :KmConversationBuilder
        if(Kommunicate.isLoggedIn(context))
            kmConversationBuilder= KmConversationBuilder(context)
        else
            kmConversationBuilder=KmConversationBuilder(context).setAppId(APPConstants.KOMMUNICATE_APP_ID)
                    .setKmUser(user)
        kmConversationBuilder
                .launchConversation(object : KmCallback {
                    override fun onSuccess(message: Any) {
                        onLoading?.invoke(false)
                    }

                    override fun onFailure(error: Any) {
                        onLoading?.invoke(false)
                        onError?.invoke(null, true)
                    }
                })
    }

Zendesk authentication always fails

Zendesk authentication never succeeds. KmZendeskClient.java line 130 requires the contact to have a display name, user id, and email. However, the contact email is never set causing this to fail. See RegisterUserClientService.java line 172. You will see the email is never set to the Contact.

Crash on Android 12

Hi,
My app targets android 12 and I use the latest version of sdk 2.3.0. Users ran into an issue when push notification comes:

Caused by java.lang.IllegalArgumentException
<my.app.package>: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.

android.app.PendingIntent.checkFlags (PendingIntent.java:382)
android.app.PendingIntent.getActivityAsUser (PendingIntent.java:465)
android.app.PendingIntent.getActivity (PendingIntent.java:451)
android.app.PendingIntent.getActivity (PendingIntent.java:415)
com.applozic.mobicomkit.api.notification.NotificationService.notifyUserForNormalMessage (NotificationService.java:402)
com.applozic.mobicomkit.broadcast.BroadcastService.sendNotificationBroadcast (BroadcastService.java:184)
com.applozic.mobicomkit.api.conversation.MobiComMessageService.sendNotification (MobiComMessageService.java:249)
com.applozic.mobicomkit.api.conversation.MobiComMessageService.addMTMessage (MobiComMessageService.java:230)
com.applozic.mobicomkit.api.conversation.MobiComMessageService.processMessage (MobiComMessageService.java:136)
com.applozic.mobicomkit.api.conversation.MobiComMessageService.syncMessages (MobiComMessageService.java:297)
com.applozic.mobicomkit.api.conversation.ConversationIntentService.onHandleWork (ConversationIntentService.java:84)
androidx.core.app.JobIntentService$CommandProcessor.doInBackground (JobIntentService.java:396)
androidx.core.app.JobIntentService$CommandProcessor.doInBackground (JobIntentService.java:387)
android.os.AsyncTask$3.call (AsyncTask.java:394)
java.util.concurrent.FutureTask.run (FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
java.lang.Thread.run (Thread.java:920)

Meta data's parameters are not received on server side

When i send a message i send a parameter in metadata. Here is log which get printed when i send a message :

Sending message to server: {
"applicationId": "174afd6c613bbb5be0bbd725cafbe88",
"attDownloadInProgress": false,
"canceled": false,
"clientGroupId": "[email protected]_523659",
"connected": false,
"contactIds": "",
"contentType": 0,
"createdAtTime": 1618817104202,
"delivered": false,
"deviceKey": "235cc17d-d712-4ad2-97d5-d4bc29753274",
"groupId": 57925473,
"hidden": false,
"key": "212a5201-f473-4f05-9322-925342e92380",
"message": "hello. testing again",
"metadata": {
"userId": "66b3d32cd58a51a54d35a3547cc7e5e0"
},

"read": true,
"replyMessage": 0,
"sendToDevice": false,
"sent": true,
"sentMessageTimeAtServer": 0,
"sentToServer": true,
"shared": false,
"source": 2,
"status": 1,
"storeOnDevice": true,
"type": 5,
"userKey": "974bb53b-3768-43f0-9cc0-24f5e9a6fc9e"
}

But our web guy is unable to get "userId" under metadata on his side. Here is the request he is getting using "dialogflow". Can you help us with this?

{"responseId":"55eb9d3d-1311-4c7d-8c65-e9271be3a59c-d74139ee","queryResult":{"queryText":"u10d2u10d0u10dbu10d0u10e0u10efu10ddu10d1u10d0","parameters":[],"allRequiredParamsPresent":true,"fulfillmentMessages":[{"payload":{"metadata":{"payload":[{"message":"u10d8u10dcu10e4u10ddu10e0u10dbu10d0u10eau10d8u10d0 u10d0u10dbu10d0u10dcu10d0u10d7u10d8u10e1 u10e8u10d4u10e1u10d0u10eeu10d4u10d1","title":"u10d8u10dcu10e4u10ddu10e0u10dbu10d0u10eau10d8u10d0 u10d0u10dbu10d0u10dcu10d0u10d7u10d8u10e1 u10e8u10d4u10e1u10d0u10eeu10d4u10d1"},{"message":"u10d6u10ddu10d2u10d0u10d3u10d8 u10d8u10dcu10e4u10ddu10e0u10dbu10d0u10eau10d8u10d0","title":"u10d6u10ddu10d2u10d0u10d3u10d8 u10d8u10dcu10e4u10ddu10e0u10dbu10d0u10eau10d8u10d0"}],"contentType":"300","templateId":"6"},"message":"u10dbu10ddu10d2u10d4u10e1u10d0u10dau10dbu10d4u10d1u10d8 $firstname, u10dbu10d4 USA2GEORGIA-u10e1 u10d1u10ddu10e2u10d8 u10d5u10d0u10e0. u10d8u10dcu10e4u10ddu10e0u10dbu10d0u10eau10d8u10d8u10e1 u10dbu10d8u10e1u10d0u10e6u10d4u10d1u10d0u10d3, u10d2u10d7u10eeu10ddu10d5u10d7, u10d0u10d8u10e0u10e9u10d8u10ddu10d7:","platform":"kommunicate"}}],"outputContexts":[{"name":"projects/usa2bot-emqd/agent/sessions/57925473/contexts/actions-followup","lifespanCount":2},{"name":"projects/usa2bot-emqd/agent/sessions/57925473/contexts/system_counters","lifespanCount":1,"parameters":{"no-input":0,"no-match":0}}],"intent":{"name":"projects/usa2bot-emqd/agent/intents/3bf1bb94-7000-4122-a3fc-78efcee19f63","displayName":"actions"},"intentDetectionConfidence":1,"languageCode":"en"},"originalDetectIntentRequest":{"payload":{"messageSource":"2","botId":"usa2georgia-bot-ahpos","attachments":[],"groupId":"57925473","applicationId":"174afd6c613bbb5be0bbd725cafbe88"}},"session":"projects/usa2bot-emqd/agent/sessions/57925473"}
white_check_mark
eyes
raised_hands

java.security.ProviderException: Failed to load generated key pair from keystore

Getting this issue when open chatbot first time in app in some devices

java.security.ProviderException: Failed to load generated key pair from keystore
    at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.loadKeystoreKeyPair(AndroidKeyStoreKeyPairGeneratorSpi.java:531)
    at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.generateKeyPair(AndroidKeyStoreKeyPairGeneratorSpi.java:473)
    at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:727)
    at java.security.KeyPairGenerator.genKeyPair(KeyPairGenerator.java:497)
    at com.applozic.mobicommons.encryption.SecurityUtils.generateRSAKeyPair(SecurityUtils.java:92)
    at com.applozic.mobicommons.encryption.SecurityUtils.getRSAKeyPair(SecurityUtils.java:111)
    at com.applozic.mobicommons.data.SecureSharedPreferences.<init>(SecureSharedPreferences.java:38)
    at com.applozic.mobicommons.data.AlPrefSettings.<init>(AlPrefSettings.java:31)
    at com.applozic.mobicommons.data.AlPrefSettings.getInstance(AlPrefSettings.java:36)
    at com.applozic.mobicomkit.Applozic.getApplicationKey(Applozic.java:85)
    at io.kommunicate.Kommunicate.init(Kommunicate.java:81)
    at com.cancan.Views.Fragments.HomeFragment.openConversation(HomeFragment.kt:102)
    at com.cancan.Views.Fragments.HomeFragment.onClick(HomeFragment.kt:96)
    at android.view.View.performClick(View.java:7448)
    at android.view.View.performClickInternal(View.java:7425)
    at android.view.View.access$3600(View.java:810)
    at android.view.View$PerformClick.run(View.java:28305)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:223)
    at android.app.ActivityThread.main(ActivityThread.java:7656)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
 Caused by: java.security.UnrecoverableKeyException: Failed to obtain information about key
    at android.security.keystore.AndroidKeyStoreProvider.getKeyCharacteristics(AndroidKeyStoreProvider.java:248)
    at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStoreKeyPairFromKeystore(AndroidKeyStoreProvider.java:316)
    at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.loadKeystoreKeyPair(AndroidKeyStoreKeyPairGeneratorSpi.java:522)
    at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.generateKeyPair(AndroidKeyStoreKeyPairGeneratorSpi.java:473) 
    at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:727) 
    at java.security.KeyPairGenerator.genKeyPair(KeyPairGenerator.java:497) 
    at com.applozic.mobicommons.encryption.SecurityUtils.generateRSAKeyPair(SecurityUtils.java:92) 
    at com.applozic.mobicommons.encryption.SecurityUtils.getRSAKeyPair(SecurityUtils.java:111) 
    at com.applozic.mobicommons.data.SecureSharedPreferences.<init>(SecureSharedPreferences.java:38) 
    at com.applozic.mobicommons.data.AlPrefSettings.<init>(AlPrefSettings.java:31) 
    at com.applozic.mobicommons.data.AlPrefSettings.getInstance(AlPrefSettings.java:36) 
    at com.applozic.mobicomkit.Applozic.getApplicationKey(Applozic.java:85) 
    at io.kommunicate.Kommunicate.init(Kommunicate.java:81) 
    at com.cancan.Views.Fragments.HomeFragment.openConversation(HomeFragment.kt:102) 
    at com.cancan.Views.Fragments.HomeFragment.onClick(HomeFragment.kt:96) 
    at android.view.View.performClick(View.java:7448) 
    at android.view.View.performClickInternal(View.java:7425) 
    at android.view.View.access$3600(View.java:810) 
    at android.view.View$PerformClick.run(View.java:28305) 
    at android.os.Handler.handleCallback(Handler.java:938) 
    at android.os.Handler.dispatchMessage(Handler.java:99) 
    at android.os.Looper.loop(Looper.java:223) 
    at android.app.ActivityThread.main(ActivityThread.java:7656) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
 Caused by: android.security.KeyStoreException: Key not found
    at android.security.KeyStore.getKeyStoreException(KeyStore.java:1281)
    at android.security.keystore.AndroidKeyStoreProvider.getKeyCharacteristics(AndroidKeyStoreProvider.java:250)
    at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStoreKeyPairFromKeystore(AndroidKeyStoreProvider.java:316) 
    at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.loadKeystoreKeyPair(AndroidKeyStoreKeyPairGeneratorSpi.java:522) 
    at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.generateKeyPair(AndroidKeyStoreKeyPairGeneratorSpi.java:473) 
    at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:727) 
    at java.security.KeyPairGenerator.genKeyPair(KeyPairGenerator.java:497) 
    at com.applozic.mobicommons.encryption.SecurityUtils.generateRSAKeyPair(SecurityUtils.java:92) 
    at com.applozic.mobicommons.encryption.SecurityUtils.getRSAKeyPair(SecurityUtils.java:111) 
    at com.applozic.mobicommons.data.SecureSharedPreferences.<init>(SecureSharedPreferences.java:38) 
    at com.applozic.mobicommons.data.AlPrefSettings.<init>(AlPrefSettings.java:31) 
    at com.applozic.mobicommons.data.AlPrefSettings.getInstance(AlPrefSettings.java:36) 
    at com.applozic.mobicomkit.Applozic.getApplicationKey(Applozic.java:85) 
    at io.kommunicate.Kommunicate.init(Kommunicate.java:81) 
    at com.cancan.Views.Fragments.HomeFragment.openConversation(HomeFragment.kt:102) 
    at com.cancan.Views.Fragments.HomeFragment.onClick(HomeFragment.kt:96) 
    at android.view.View.performClick(View.java:7448) 
    at android.view.View.performClickInternal(View.java:7425) 
    at android.view.View.access$3600(View.java:810) 
    at android.view.View$PerformClick.run(View.java:28305) 
    at android.os.Handler.handleCallback(Handler.java:938) 
    at android.os.Handler.dispatchMessage(Handler.java:99) 
    at android.os.Looper.loop(Looper.java:223) 
    at android.app.ActivityThread.main(ActivityThread.java:7656) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 

java.lang.NoClassDefFoundError: java.nio.charset.StandardCharsets in Android API < 19

We have been a long time with an old version of your library. Now, we have upgraded to the latest version and the library crashes on all the devices we have with API 16, 17 and 18. We have also tested your test app and it crashes as well.

The problem is in the org.eclipse.paho.client.mqttv3 library version. Version 1.2.1 and higher do not seem to support API < 19, because they use StandarCharsets and StandarCharsets was added in API 19.

For now we have fixed it by forcing the library version in our build.gradle, while we hope you can release a new version with the problem fixed.

implementation('org.eclipse.paho:org.eclipse.paho.client.mqttv3') { version { strictly '1.2.0' } }

Stacktrace

2022-09-01 13:44:41.062 1993-2336/xxx.xxxxx.xxxxxx E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #4
    java.lang.RuntimeException: An error occured while executing doInBackground()
        at android.os.AsyncTask$3.done(AsyncTask.java:299)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
        at java.util.concurrent.FutureTask.run(FutureTask.java:239)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
        at java.lang.Thread.run(Thread.java:856)
     Caused by: java.lang.ExceptionInInitializerError
        at org.eclipse.paho.client.mqttv3.internal.ClientState.<init>(ClientState.java:162)
        at org.eclipse.paho.client.mqttv3.internal.ClientComms.<init>(ClientComms.java:108)
        at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:470)
        at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:320)
        at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:315)
        at org.eclipse.paho.client.mqttv3.MqttClient.<init>(MqttClient.java:227)
        at com.applozic.mobicomkit.api.AlMqttClient.<init>(AlMqttClient.java:21)
        at com.applozic.mobicomkit.api.ApplozicMqttService.connect(ApplozicMqttService.java:94)
        at com.applozic.mobicomkit.api.ApplozicMqttService.connectPublish(ApplozicMqttService.java:126)
        at com.applozic.mobicomkit.api.conversation.ApplozicMqttIntentService.onHandleWork(ApplozicMqttIntentService.java:104)
        at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:396)
        at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:387)
        at android.os.AsyncTask$2.call(AsyncTask.java:287)
        at java.util.concurrent.FutureTask.run(FutureTask.java:234)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 
        at java.lang.Thread.run(Thread.java:856) 
     Caused by: java.lang.NoClassDefFoundError: java.nio.charset.StandardCharsets

enter_message_hint is never used

Hello,

I am integrating the Kommunicate Flutter SDK and I'm currently having a problem with the localization on the Android side. I'm successfully translating most of the resources to French and it seems to me that we are not able to use a customized string for the hint "Write a Message.." used at the bottom of this screen.

Screenshot_20220420-111822

The string resource that seems to mean to be edited is enter_message_hint in mobicom_strings.xml but it is never used.

I think that this part of the code is the problem :

messageEditText.setHint(!TextUtils.isEmpty(alCustomizationSettings.getEditTextHintText()) ? alCustomizationSettings.getEditTextHintText() : getString(R.string.enter_message_hint));

as alCustomizationSettings.getEditTextHintText() is never Empty and contains "Write a Message.."

metadata is not passed to the payload of dialogflow webhook request

Hi,
I did a chatbot integration with dialogflow.
My dialogflow bot also has webhook integration.
When I use the following code; I don't see the metadata and the user information passed to payload from kommunicate to dialogflow webhook.

Is the following code wrong or is there a configuration that I did not do or is there an isse on kommunicate server-side?

        new KmConversationBuilder(this.activityContext)
                .setSkipConversationList(true)
                .setSingleConversation(true)
                .setBotIds(botIds)
                .setMessageMetadata(this.chatContext)
                .setKmUser(user)
                .launchConversation(new KmCallback() {
            @Override
            public void onSuccess(Object message) {
                System.out.println("onSuccess");
                System.out.println(message);
            }

            @Override
            public void onFailure(Object error) {
                System.out.println("onFailure");
                System.out.println(error);
            }
        });

Kommunicate giving exception when logging in in Release Build but working good in Debug Build

W/System.err: java.lang.IllegalArgumentException: class c.b.g.a declares multiple JSON fields named a
W/System.err:     at com.google.gson.b.a.i.a(ReflectiveTypeAdapterFactory.java:172)
W/System.err:     at com.google.gson.b.a.i.a(ReflectiveTypeAdapterFactory.java:102)
W/System.err:     at com.google.gson.Gson.a(Gson.java:458)
W/System.err:     at com.google.gson.Gson.a(Gson.java:696)
W/System.err:     at com.google.gson.Gson.a(Gson.java:683)
W/System.err:     at com.google.gson.Gson.b(Gson.java:638)
W/System.err:     at com.google.gson.Gson.b(Gson.java:618)
W/System.err:     at com.applozic.mobicomkit.api.a.a.a.a(RegisterUserClientService.java:100)
W/System.err:     at c.b.a.i.a(KmUserLoginTask.java:62)
W/System.err:     at c.b.a.i.doInBackground(KmUserLoginTask.java:24)
W/System.err:     at android.os.AsyncTask$2.call(AsyncTask.java:334)
W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
W/System.err:     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:246)
W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
W/System.err:     at java.lang.Thread.run(Thread.java:764)

Wrong storage permission request on API version 10+

Permission WRITE_EXTERNAL_STORAGE will no longer provide write access when targeting Android 10 and above. Details: https://developer.android.com/training/data-storage/shared/media#request-permissions

But in your SDK, WRITE_EXTERNAL_STORAGE is requested regardless of the API version.

Client can set attribute android:maxSdkVersion on that permission in manifest, it has the effect of removing element on higher Android SDK versions, at least in terms of how runtime permissions work.

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
                 android:maxSdkVersion="28" />

There is a lint warning in AS with regards to WRITE_EXTERNAL_STORAGE, it suggest set atrribute android:maxSdkVersion="28". But in that case verification that both WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE permissions granted will always not pass (ConversationActivity.java:700). The files selection screen will not open and will show up snackbar "Storage permission is required...".

Image problem on Android 10 OS

Showing image and play sound doesn't work on Android OS 10 (permissions are active).
It is easy to reproduce on real device as well on Emulator.

How to set parent activity for conversation activity?

How to set the parent activity to the conversation activity so that the user navigates back to the parent activity when the conversation activity is launched from chat notification.

ApplozicSetting.getInstance(getContext()).setParentActivity("<COMPLETE-RESOLVED-PATH-OF-THE-ACTIVITY>");

^ found this from documentation but seems like ApplozicSetting is no longer available in io.kommunicate.sdk:kommunicateui:2.1.4 package.

Do let me know if there is any other way to set parent activity.

Update

Please update google libraries to latest.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.