chat-sdk / chat-sdk-android Goto Github PK
View Code? Open in Web Editor NEWChat SDK Android - Open Source Mobile Messenger
Home Page: https://chatsdk.co
License: Other
Chat SDK Android - Open Source Mobile Messenger
Home Page: https://chatsdk.co
License: Other
Hi,
First thank for very nice chat sdk product. I can see many modules at http://chatsdk.co/modules-2/, but now I want to write own module, so how can I start? I can't find any documents about how to write custom module for ChatSDK. (both Android and IOS)
Thanks.
Receiving crash after the app was built from the master branch running on Samsung Galaxy S7 Edge - OS 6.0.1, API 23
Steps to reproduce:
search for contact
add contact
start chat with contact
send message
receive crash
sometimes happens when sending 1 message after the other with 1 second delay - in direct conversations and also in chat rooms
02-27 15:42:58.123 18954-18954/com.braunster.androidchatsdk.app E/ClipboardServiceEx: clipEx is android.sec.clipboard.ClipboardExManager@d4756b4
02-27 15:42:58.123 18954-18954/com.braunster.androidchatsdk.app E/ClipboardServiceEx: clipEx has text data : false
02-27 15:42:58.123 18954-18954/com.braunster.androidchatsdk.app E/ClipboardServiceEx: clipEx is android.sec.clipboard.ClipboardExManager@d4756b4
02-27 15:42:58.123 18954-18954/com.braunster.androidchatsdk.app E/ClipboardServiceEx: clipEx has text data : false
02-27 15:42:58.133 18954-18954/com.braunster.androidchatsdk.app E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
02-27 15:42:58.133 18954-18954/com.braunster.androidchatsdk.app E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
02-27 15:42:58.143 18954-26285/com.braunster.androidchatsdk.app V/BMessageWrapper: deserialize, Value: {user-firebase-id=QNTiaO17O7TB6UkJ4c2Cq6H8jlJ3, date=1488228178977, type=0, payload=Hrllo}
02-27 15:42:58.173 18954-18954/com.braunster.androidchatsdk.app D/ChatSDKMessagesListAdapter: Checking if exist
02-27 15:42:58.213 18954-18954/com.braunster.androidchatsdk.app V/BMessageWrapper: push message, onDone
02-27 15:42:58.213 18954-18954/com.braunster.androidchatsdk.app V/BFirebaseNetworkAdapter: pushForMessage
02-27 15:42:58.233 18954-18954/com.braunster.androidchatsdk.app D/AndroidRuntime: Shutting down VM
02-27 15:42:58.233 18954-18954/com.braunster.androidchatsdk.app E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.braunster.androidchatsdk.app, PID: 18954
java.lang.IllegalStateException: Deferred object already finished, cannot notify progress
at org.jdeferred.impl.DeferredObject.notify(DeferredObject.java:82)
at com.braunster.chatsdk.network.AbstractNetworkAdapter$1.run(AbstractNetworkAdapter.java:170)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
I did ask this on my previous issue but got no reply so if someone can close that issue and reply to this one then that would be great!
Also i need to know how to delete a contact from the list because everything i have tried so far hasn't worked and it's beginning to get rather frustrating now especially when i need this app released asap, so any help would be great right now!
Thanks again!
Hello,
I am trying to add ChatSDK to my existing project. It gets added but now how to access particular activities like signup, login, chat etc. on particular click or event.
Please help me.
The SuperToast service is crashing the app if two image messages are sent quickly.
The crash happens in ChatSDKUiHelper.showProgressCard(String text)
at the bolded line shown below.
public void showProgressCard(String text){ if (colleted()) return; if (context.get() instanceof Activity) { initCardToast(); View decorView = ((Activity) context.get()).getWindow().getDecorView().findViewById(android.R.id.content); ViewGroup viewGroup = superCardToastProgress.getViewGroup(); if (viewGroup!=null && superCardToastProgress.getView()!= null && viewGroup.findViewById(superCardToastProgress.getView().getId()) != null) viewGroup.removeView(superCardToastProgress.getView()); decorView.findViewById(R.id.card_container).bringToFront(); superCardToastProgress.setText(text); if (!superCardToastProgress.isShowing()) superCardToastProgress.show(); } }
The stack trace is the following
--------- beginning of crash
03-24 17:51:56.147 12215-12215/com.braunster.androidchatsdk.app E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.braunster.androidchatsdk.app, PID: 12215
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=6809, result=-1, data=Intent { (has extras) }} to activity {com.braunster.androidchatsdk.app/com.braunster.chatsdk.activities.ChatSDKChatActivity}: java.lang.IllegalArgumentException: Cannot add a null child view to a ViewGroup
at android.app.ActivityThread.deliverResults(ActivityThread.java:4089)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4132)
at android.app.ActivityThread.-wrap20(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1533)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: java.lang.IllegalArgumentException: Cannot add a null child view to a ViewGroup
at android.view.ViewGroup.addView(ViewGroup.java:4189)
at android.view.ViewGroup.addView(ViewGroup.java:4171)
at com.github.johnpersano.supertoasts.SuperCardToast.show(SuperCardToast.java:348)
at com.braunster.chatsdk.Utils.helper.ChatSDKUiHelper.showProgressCard(ChatSDKUiHelper.java:388)
at com.braunster.chatsdk.Utils.helper.ChatSDKChatHelper.sendingMessageToast(ChatSDKChatHelper.java:486)
at com.braunster.chatsdk.Utils.helper.ChatSDKChatHelper.sendImageMessage(ChatSDKChatHelper.java:641)
at com.braunster.chatsdk.Utils.helper.ChatSDKChatHelper.processCroppedPhoto(ChatSDKChatHelper.java:420)
at com.braunster.chatsdk.Utils.helper.ChatSDKChatHelper.handleResult(ChatSDKChatHelper.java:373)
at com.braunster.chatsdk.activities.abstracted.ChatSDKAbstractChatActivity.onActivityResult(ChatSDKAbstractChatActivity.java:566)
at android.app.Activity.dispatchActivityResult(Activity.java:6932)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4085)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4132)
at android.app.ActivityThread.-wrap20(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1533)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
The toast should not be launching if it is already displayed, and I need to check how this problem is occurring despite us checking if the toast is filled or not.
The section Wiki point to https://github.com/chat-sdk/chat-sdk-ios/wiki
Hello again,
My app sends audio only or audio with text but that's causes one massive problem and that is the message list becomes extremely slow! so i need to delete every audio message after the user and friend has played the message once or twice but the way the audio message is saved then sent is confusing me.
I have looked at the code which sends and saves the message but from what I've seen, i have no idea what the best way would be to delete the message?
Also i did pay for the audio module, so i haven't added audio message myself!
Oh and i feel like i have improved the way audio messages are recorded and sent because the standard way just wasn't the best as you could cancel the recording or anything like that so if any of the SDK devs want the code then let me know!
Thanks
Build Successfully but when i generate apk..shows error in Country code...values ..(missing translations)
Is Forgot password supported ?
Error No resource found that matches given name (At value with value @string/facebook_id)
whenever I load project in I got an error re-download dependencies and sync project again. Kindly tell me how to resolve this issue. I tried downloading gradle zip files but don't know where and how to place that files in project folder.
Every time i try to run the app i get this error: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.skintmedia.voice, PID: 15447 java.lang.RuntimeException: Unable to resume activity {com.skintmedia.voice/com.braunster.chatsdk.activities.ChatSDKLoginActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.facebook.UiLifecycleHelper.onResume()' on a null object reference at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3121) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3152) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2499) at android.app.ActivityThread.access$900(ActivityThread.java:157) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5551) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.facebook.UiLifecycleHelper.onResume()' on a null object reference at com.braunster.chatsdk.activities.ChatSDKBaseActivity.onResume(ChatSDKBaseActivity.java:182) at com.braunster.chatsdk.activities.abstracted.ChatSDKAbstractLoginActivity.onResume(ChatSDKAbstractLoginActivity.java:63) at com.braunster.chatsdk.activities.ChatSDKLoginActivity.onResume(ChatSDKLoginActivity.java:107) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1259) at android.app.Activity.performResume(Activity.java:6347) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3110) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3152) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2499) at android.app.ActivityThread.access$900(ActivityThread.java:157) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5551) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
But i don't know why?
During testing you could set the root path to test and then when you go live, you could change it to live.
Can you please explain this point? What should i set my root path? @kykrueger @bensmiley @simonsmiley64
This exception occurs occasionally when I run the Chat App. It seems the Backendless has failed to register the device and is throwing an error. How can I resolve this, or at least catch this exception so that it won't crash the app entirely?
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.braunster.chatsdk, PID: 15600 java.lang.RuntimeException: Could not register device on Backendless server: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Can't call rollback when autocommit=true at com.backendless.push.BackendlessBroadcastReceiver.onError(BackendlessBroadcastReceiver.java:148) at com.backendless.push.BackendlessBroadcastReceiver$1.handleFault(BackendlessBroadcastReceiver.java:310) at com.backendless.Messaging$2.handleFault(Messaging.java:247) at com.backendless.async.message.AsyncMessage$FaultHandler.handle(AsyncMessage.java:83) at com.backendless.async.message.AsyncMessage.handleCallback(AsyncMessage.java:41) at com.backendless.core.AndroidCarrier$1.handleMessage(AndroidCarrier.java:37) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
This problem has happened to others: http://support.backendless.com/topic/android-push-registration-crashes-app
Comments on lines: 49, 91, 158, 190, 222 and 362 of the New class.
Changes were also made to the layout of the bubble view! This will be needed in order for there to be no errors!
Lines 586 – 595 were also removed from ChatSDKMessagesListAdapter.java
Hopefully that’ll be all you need!
Everything is fine without any error...but I have a Question , Should I have to add something in activity.main.xml of my existing project or only write in main.java...as in README There is code only for MainActivity.java, gradle,
So i don't know if this is intentional or if it's a bug but when you delete a thread, it keeps every message that was sent inside that thread?.
I only ask because to me, deleting a thread means deleting an entire conversation between 2 users which would mean the conversation being gone forever
Create a group chat and then click the + button. Although we can search for users, our contacts are not shown under the contacts section title.
Hi,
Adding image second time to thread shows unable to fetch image toast message
Add one image to thread
Add another image to thread then the error will show up
Example apk provided on website is not working.
Nice app ..but i don't want to import....i want to build whole app by myself. .......plxxx help me.....plxxx
I implemented Chat Sdk in my ios App..I really Appriciate your work,But i am having problem with cross platform Messaging,Push Notification is not working,And received messages are blank..please fix that issue.Need Stable Version for Android..
I know i have been banging on about this a lot but i was wondering if we're any closer to achieving it?
This is what i know works, the deleteContact method, i know because when you delete the contact, it does indeed get removed BUT it won't be gone from the list and when you restart the app, it will crash, the app will also crash when you click the contact after deleting. I think that is because of what @kykrueger told me about.
Now, i remember @kykrueger saying that this is because the contact has an open thread so it will keep the name of user in the list but not as a contact but a name related to an open thread, i was also told that i would need to search any open threads and delete the user from said thread before deleting the contact BUT that is where I'm struggling because i don't think i am quite getting how to do that at all!
So if possible, i either need to know exactly how to search current threads and then delete them or like before, post the code that i am currently using and wait to see if any of you (when you have the time of course) can use to the code and tweak it to get it to work!
Ryan
Hello, i've made my chat apk, signed it and all but when i put the app on google play it says i violate the term of policy because of WebViewClient.onReceivedSslError and sais vurnable categories com.backendless.SocialAsyncCallback$1 :/ Hope you help :) Tnx for the nice sdk btw :D
Why we have to include json file of this package? what information does it contain? why nis it necessary? please explain @bensmiley @kykrueger
When a user closes the app they are set as offline in the database. This means push notifications will be sent to them.
With Android if the user minimises the app that user is still registered as online. This means they don't get sent push notifications and are marked as online in the app. How can we mark those users as offline when the app is minimised?
I am currently trying to integrate the ChatSDK in an app where I have already implemented Firebase, Facebook and I am getting a lot of errors if I try to remove the Facebook module. is there a way to skip the authetification part from the ChatSDK and use currently logged in users in my app?
I can't understand this( make sure you set the pakagr name with.....com.braunster.androidchatsdk.firebaseplugin) where i use it ?? also i am configuring my Own app with my project name...can i edit it
How to access below Modules? Is it below module possible with fire base?
Typing indicator
Read receipts
Location based chat
Audio messages
Video messages
Push notifications
Hi,
Username, Email, Phone Number should be a unique field. FB rules also need the update.
Error:(261, 57) error: cannot find symbol method isAnnotationPresent(Class)
FAILURE: Build failed with an exception.
Compilation failed; see the compiler error output for details.
Hi there,
I'm not able to send location to other users. I saw the ChatSDKLocationActivity.java file. There were some codes which was deprecated. I tried it to do by myself but i'm not able to do.
Upload a video tutorial, to complete the chat project for android devices. @bensmiley @kykrueger
When a user registers for the first time, the search index isn't pushed - this means that they can't be found via search. It's only pushed when they update their profile details.
The search index should be updated every time the user logs in.
Okay never mind, i know what was wrong! it looks like the ID of AUDIO_PICKER_ID was the same as ADD_USERS so it was trying to upload a file without being told!
So this is should be changed in the SDK to stop it happening again
I changed id of line: 78 from 103 to 120
Thanks
Hi there,
I have followed all the steps correctly except facebook setup. I can register the user on my firebase account but after that the app gets terminate after showing the main layout screen. Please help me. I want to use this as my final year project(200 marks) :(
BFirebaseNetworkAdapter adapter = new BFirebaseNetworkAdapter(getApplicationContext()); // Create new network adapter is getting error
BChatcatNetworkAdapter adapter = new BChatcatNetworkAdapter(getApplicationContext());
// Create new network adapter
Hi there,
I have logged in as a new user but whatever group chats I have done from different account was created for the new users also.
If you create a group chat and add several users and then one of those users leaves, the group still displays as having all the original users.
This affects the thread name and thread details screens.
I have entered google API Key, still getting this error. Please help @bensmiley @kykrueger
I am getting this error when trying to build: Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/android/volley/Request$Priority.class
Can you help please? Also I needed help about hoe to start chat activity in my existing project. My app already includes Fb and Google login feature
Hello again,
When i first used and setup the audio module, everything worked as it should but after creating a new project and importing and setting everything up again, it has started to crash for some reason?
The log: 03-06 18:53:48.923 2011-2011/com.skintmedia.voice E/AndroidRuntime: FATAL EXCEPTION: main Process: com.skintmedia.voice, PID: 2011 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.skintmedia.voice/com.braunster.chatsdk.activities.ChatSDKLoginActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.braunster.chatsdk.network.AbstractNetworkAdapter.facebookEnabled()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2434) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494) at android.app.ActivityThread.access$900(ActivityThread.java:157) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5551) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.braunster.chatsdk.network.AbstractNetworkAdapter.facebookEnabled()' on a null object reference at com.braunster.chatsdk.activities.ChatSDKLoginActivity.onCreate(ChatSDKLoginActivity.java:44) at android.app.Activity.performCreate(Activity.java:6272) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2387) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494) at android.app.ActivityThread.access$900(ActivityThread.java:157) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5551) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
Line 52: <com.braunster.chatsdk.view.ChatMessageBoxView android:layout_width="fill_parent" android:layout_height="wrap_content" 52>> android:id="@+id/chat_sdk_message_box" </com.braunster.chatsdk.view.ChatMessageBoxView>
Thanks
So I've just spent over £80 for the Audio Message module but i can even use it with android despite saying i can? Is there something I'm missing or do you not actually support the module for android yet?
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.