-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to configure GCM push notifications? #1096
Comments
@maxlinux2000 Let me take a look at this process. We're using a package i'm not familiar with to do the push notifications. So I need to brush up. |
@geekgonecrazy For what it's worth, if you are referring to |
@gmsecrieru good point! Hopefully its more flexible. |
@maxlinux2000 I also have problems configuring GCM push notifications. I found a way to check if the phone receives the notification on stackoverflow (provide there the API key and the device ID (you can find this id in the logs of the server when you login the first time on a new phone)) I can receive the notifications from this php script, but not from the rocketchat server. I hope this helps. |
... the ID of my phone? sorry but I don't understand. Another problem, the interface of the google console has changed a lot. Do you know MaX |
Sorry I didn't explained myself well. I expect you have your Rocket.Chat running on your own server (e.g. on docker like for me) and you build your android application like explained in this article. After you built the application you install it on your phone and log in to your server. During the login you check the stdout of your server. (with docker you can do it with docker logs -f "containername").
Where A****** is the device ID. Afterwards you can follow the article on stackoverflow to check if your phone receives the notification you sent from phpfiddle. |
Meanwhile I managed to make the push notifications work. |
Many many tnx for your help. Please post here some screenshot of your google console configuration, Another question about these mysterious (for me) GCM in rocket.chat: On 10/17/15, Tharnas [email protected] wrote:
ciao, |
Your welcome :-) I went to here to get my API Key and Sender ID:
After I installed the application on my phone, logged in and sent a message it looks like this: |
Ok, I can confirm that the json file is not necessary because the chat Now my problem :) Push: Send message "@maxlinux2000" via query { userId: 'QPE3RsvcJ6bsaakQP' } A question more: regards On 10/17/15, Tharnas [email protected] wrote:
ciao, |
When I send a message it looks like this:
Your result looks like that the app does not register at the server. As I have a docker environment so I use this way to build it: https://github.com/RocketChat/Rocket.Chat/wiki/How-to-Build-Rocket.Chat-for-Android Is it possible for you to chat between webpage and app? |
OK I understand the problem... So, new strategy: 2 app! But I never built a native app, so please tell me if these steps are corrects: In order to build my own rocket.chat app for android a) a local ubuntu 14.04 - 64bit on machine with 4GB ram apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609Decho "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list apt-get updateapt-get -y upgradeapt-get install -y linux-image-generic-lts-trustyrebootand follow at reboot: apt-get install -y docker-enginedocker run hello-worlddocker installed! Now the rocket.chat environment: apt-get install -y openjdk-7-jdkapt-get install -y bison git gperf libxml2-utils make python-networkx zlib1g-dev:i386 zipapt-get install -y g++-multilibgit clone https://github.com/rocketchat/Rocket.Chatdocker run -i -t -v /root/Rocket.Chat rocketchat/meteor12androidbuildercd Rocket.Chatmeteor add-platform androidmeteor add crosswalkmeteor build --server http://chat.mydomain.org ./buildand... if all run correctly I will have an apk configured for my server... correct? Following, now I will configure a rocket,chat server in a VPS under ubuntu 14.04 64bit (with dns name chat.mydomain.org) (clean ubuntu 14.04 64bit installation on vps with public IP address and all as root) apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609Decho "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list apt-get updateapt-get -y upgradeapt-get install -y linux-image-generic-lts-trustyrebootapt-get install -y docker-enginedocker run hello-worldgit clone https://github.com/rocketchat/Rocket.Chatdocker run -i -t -v /root/Rocket.Chat rocketchat/meteor12androidbuildercd Rocket.Chatmeteor add-platform androidmeteor add crosswalkmeteor build --server http://chat.mydomain.org ./buildWith this, I will have a rocketchat server runnig a port 80 on http://chat.mydomain.org that's sound good? Do you see something wrong or omitted? regards |
I'm not sure if I realy got you. I build mine like the following: (after I installed docker and probably git on a new clean machine)
(You will find the apk in /root/Rocket.Chat/build/android/appName_ You don't need to install all of this stuff "openjdk-7-jdk bison git gperf libxml2-utils make python-networkx zlib1g-dev:i386 zip g++-multilib" on the host machine (if I get it right). The docker image "rocketchat/meteor12androidbuilder" contians all the dependencies it needs. The build of the apk in docker is independent on how you publish your server. |
By the way I'm not sure if you can build the latest version as there are currently some issues: #1156 |
TNX for the help! before build it, I need to re-install my system from 0 My pc is a 64bit, but I'm using the 32bit version of ubuntu.... So I think I will need 2 day before to build the app. I hope that the bug So, I will answer to this very interesting topic, asap. regards On 10/18/15, Tharnas [email protected] wrote:
ciao, |
You are welcome. |
Hi all, During these day I've tried to build the chat in docker, with success, but I have a big problem: I need to integrate with a Iframe the chat in my cordova app. HOW TO add the push notifications (in Cordova)? I'm search a plugin and this seem good: but I need an esay way to check if my app is sending the ID of the phone to the server chat. last but not last, Some one have experiencop how to use phonegap-plugin-push in a real proj? regards |
Welcome back :-) with you can run the following command to see the output of the server:
When the client registers at the server you will see something like this:
I think the client registers always after you installed the app and start it or log in. Not sure. |
during the last days i have do a lot of works, far of my favourite chat, but now I'm back :) I have some problem to build rocketchat without docker ... with your last post i assume that I can see the logs using the doker... correct? but with your command I receive that: root@chat: My environment run in VPS server ubuntu 64bit and rocketchat is lauched with: screen How I can do it? |
Sorry this is my fault, use docker logs -f rocket.chat (without ") For building there is also an image for docker. |
So, I'm back. It looks like your docker client is not properly connected to the docker deamon. Check if set it up correctly. (https://docs.docker.com/installation/ubuntulinux/)
Afterwards you can follow the instructions on this page https://github.com/RocketChat/Rocket.Chat/wiki/Deploy-with-Docker to setup the rocket.chat server. (you need to have docker-compose installed) After the server is running you can build your application like described there https://github.com/RocketChat/Rocket.Chat/wiki/How-to-Build-Rocket.Chat-for-Android |
Hi, tnk for help! My docker daemon is not runnig: root@chat:~# docker version Today I have received my first push message (!!) using this tutorial: http://phonegappro.com/tutorials/apache-cordova-phonegap-push-notification-tutorial-part-1/ Now in theory my cordova app (with rocketchat in a iframe) can self register in my chat server, sending the phone-id and the chat, always in theory, can send push messages.... but now my dude: How can I send push messege from rocket.chat using the interface? |
I'm trying to understand this all - are push notifications impossible when using self hosted rocket chat and the RocketChat app from the Play store? |
Please clarify the setup process for this. I have setup my app like @Tharnas explained and put the data for Server API Key and Sender ID in the Settings but push doesn't seem to work |
Hi, With Google Cloud Messaging (GCM) it's like that: This means you need and API key from GCM with the package name of the app that is uploaded to the play store. As you are not the owner of this app/package name I don't know if you are able/allowed to register for this package name. (Not sure if or how they can check this) I will try to make it run with the app from the play store and let you know. |
@Tharnas thanks for the update. There is a new property push_gateway in the PUSH Settings on the server. This might somehow be the key to getting it work with the app from the store. Unfortunately I can't find any documentation on how to use this. |
I also saw that after I updated my server. Currently I struggle with logging in from the application. Need to check this first. |
This works now and can be closed. Just install the latest version of the Server and get the Android App from the play store. Everything is configured to work by default. IOs App is already in the approval process. Big Up Rocket.Chat Team! |
For guys who end up at this issue:
|
Hi
I want to activate GCM notifications.
so I have creates a new project in the google console with te following API
And this is the configuration... but obviously doesn't work.
Where is my error?
And the second question... how to test it?
Can I send a message to a user not connected and hi receive a notification on his android phone?
tnx
MaX
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: