crazyhitty / firebase-chat Goto Github PK
View Code? Open in Web Editor NEW[Deprecated] One to one chat implementation using firebase.
License: MIT License
[Deprecated] One to one chat implementation using firebase.
License: MIT License
I saw there is a method " onPushNotificationEvent" but is never called, same for normal notifications.
Is this feature (notifications) not implemented yet?
Btw, awesome project, I like how you structured it :D and it worsk very good, just the issue with the notifications.
EDIT:
I get the next error from the notification builder when I send a message :
E/FcmNotificationBuilder: onResponse: {"multicast_id":8285779204958253584,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"MissingRegistration"}]}
MissingRegistration.... what could it mean?
EDIT2:
The first edit was my fault, passed an empty string token as parameter when I start ChatActivity.
Now I pass the correct string token of the user I want to recive the notification. This token, transformed to String looks like com.google.android.gms.tasks.zzh@4221a2f8 so I pass as parameter something like this.
But I get again an error:
E/FcmNotificationBuilder: onResponse: {"multicast_id":5901028783144837003,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidRegistration"}]}
I have no idea why...
EDIT3:
I have tryed to store the tokens in my personal database, but it looks like this token change every time I call getToken(true/false).
Anyway, it didn't make work the notifications.
Thank you for your time.
EDIT4:
I finaly get how works the registration tokens. Actualy I made work the push notifications with FCM
Hey,
I'm unable to open the app in AS it says some files are missing from the directory. May I know how to build the directory and the DB structure?
Can you provide me any tutorial kind of reference for the same?
this similar to a previously created and "closed" issue without provision of any actual solution: Login and Registrations are happening and are also being reflected in the Console. But the issue is that after the login when app goes to the screen where it will display the users available, there the app is getting crashed.
only one token can send or receive messages, please help.
If any user tries to send a message there was nothing and if I sign on my device with this user this user can send or receive messages.
When sender send message, receiver doesn't receive the notification. Kindly help me
Just waste of time, Not working!!!
Can you please share the database structure?
Hello,
The chat notifications for new message in the status bar when the app is in the background isn't being displayed. May I know what should be done for this?
The FirebaseMessaging service is not working and onMessageReceived is never called regardless of app in background or foreground. Due to this the notification is also not working. Tried putting log for data received in onMessageReceived, but no logs came, which indicated the service not working. Any idea how to solve this?
If we are using firebase realtime database it will automatically update the new message in onDataChanged() method if the chatActivity is open, then why the need of eventBus there to pass that a new message came
Hey, I followed your instructions from your updated Readme file. Login and Registrations are happening and are also being reflected in the Console. But the issue is that after the login when app goes to the screen where it will display the users available, there the app is getting crashed.
The below is the logcat. Can you assist me with this?
Process: com.crazyhitty.chdev.ks.firebasechat, PID: 12649
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.substring(int, int)' on a null object reference
at com.crazyhitty.chdev.ks.firebasechat.ui.adapters.UserListingRecyclerAdapter.onBindViewHolder(UserListingRecyclerAdapter.java:42)
at com.crazyhitty.chdev.ks.firebasechat.ui.adapters.UserListingRecyclerAdapter.onBindViewHolder(UserListingRecyclerAdapter.java:20)
at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:5825)
at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:5858)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5094)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4970)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2029)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1414)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1377)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:578)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3315)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3124)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3568)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:613)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639)
at android.widget.FrameLayout.onLayout(FrameLayout.java:574)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1767)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1722)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.support.design.widget.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:131)
at android.support.design.widget.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:42)
at android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:1364)
at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:846)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639)
at android.widget.FrameLayout.onLayout(FrameLayout.java:574)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1722)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639)
at android.widget.FrameLayout.onLayout(FrameLayout.java:574)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1722)
at android.view.View.layout(View.java:16001)
at android.view.ViewGroup.layout(ViewGroup.java:5181
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.