Skip to content

Commit

Permalink
Add push FAQ and refactor doc some (RocketChat#1090)
Browse files Browse the repository at this point in the history
* Add new message to faq and refactor doc some

* Update README.md

* Update README.md

* change version string to plain english

* Update README.md

* Update README.md

* Fix lint errors... Try RocketChat#1
  • Loading branch information
geekgonecrazy authored Feb 18, 2019
1 parent db3b573 commit 38fbd9b
Showing 1 changed file with 37 additions and 12 deletions.
49 changes: 37 additions & 12 deletions administrator-guides/notifications/push-notifications/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
# Push Notifications

Mobile Notifications Gateway Configuration
There are two ways to setup push notifications with Rocket.Chat:

The following description, from community member @lvh1 and updated by @lunitic, describes how to configure mobile notification gateways using the latest edition of Rocket.Chat.
* Push Gateway
* Self Configured

## Android
## Push Gateway

If you and your users intend to use the official Rocket.Chat mobile applications you need to choose this option.

To allow push notifications to be received on our official mobile application by any server, we had to establish a push gateway containing our keys. In doing so, we protect our secret keys required to send through Apple(APN) and Google(FCM) to send you and your users notifications.

## Self Configured

When you choose to self configure the push notifications, things become a bit more complicated. First, you need to get keys from both Apple and Google, and compile/release your own mobile applications to the app stores so your public keys will be distributed to your users.

Then also you will need to add your keys to Rocket.Chat.

Then you will have to compile for iOS and Android and submit them to the appropriate app stores for review.

Finally you would direct your users to download your custom version of the Rocket.Chat mobile applications.

### Configuring for Android

The Rocket.Chat native application for Android supports FCM system. Here's how you configure it:

Expand All @@ -24,25 +41,33 @@ Now that you have a project, you can add your Android app to it:

4. After you add the initialization code, run your app to send verification to the Firebase console that you've successfully installed Firebase.

## Rocket.Chat Cordova

Fill in GCM Project Number in the file www/shared/js/android_sender_id.js, replace "YOUR-ANDROID-ID-HERE" with your GCM Project Number

## iOS
### Configuring for iOS

For iOS you need an apple developer account that costs US$99 per year. Follow instructions here: <https://github.com/raix/push/blob/v3.x/docs/IOS.md>

## Rocket.Chat
### Configuring Rocket.Chat

- Go to "Administration", then "Push"
- Set the Enable Gateway to False, then you will use your own Rocket.Chat as gateway instead of the <https://rocket.chat> server
- Restart server
- Set the Enable Gateway to False, then plug the information obtained from Apple and Google
- Restart server (with out this it will not work)

Now you should be able to Send a test message. Make sure that you have logged in to the server once, and then closed the app.
You should see a test notification after you pressed the send button.

## General Observations

- You don't *need* to use a push gateway, if you don't want notifications. Adding certificates and checking to *not* user a gateway is enough
- If you don't want notifications you can just disable gateway and not provide keys.
- You cannot compile your own applications and use the Rocket.Chat push gateway.
- For iOS, you need to [convert](https://github.com/raix/push/blob/master/docs/IOS.md) both the .cer and .p12 files into .pem files
- Once everything is configured on the admin settings, the server must be restarted

## FAQ

### I am getting "Server notifications are misconfigured!"

If you are getting this message and are using our push gateway please make sure:

1. Your server version is greater or equal to 0.74.3
2. Registered (you can check this by going to `http://yourserver/admin/cloud`)

_Thanks to @lvh1 and @lunitic for starting this doc_

0 comments on commit 38fbd9b

Please sign in to comment.