FCM messaging for HCL Verse for Android clients
HCL Traveler server can use Firebase Cloud Messaging (FCM) for real time push notifications to keep your Mail, Calendar, Contact and To Do data on your HCL Verse for Android clients up to date. Google has deprecated GCM and replaced it with FCM.
The HCL Traveler server attempts to communicate with the FCM service using the host fcm.googleapis.com on port 443. Make sure that any internal firewalls between the HCL Traveler servers and this external host allow this connection.
Checking status
A connection to the FCM server will only be active in HCL Traveler if there is an active HCL Verse for Android client running on a device logged in with a Google account and Using FCM mode for auto sync.
Debugging Issues
- sending a tell traveler push test message to a device registered with FCM or
- trying HTTP POSTs to
https://oauth2.googleapis.com/tokenandhttps://fcm.googleapis.com/v1/projects/notes-traveler-2014/messages:sendin a web browser on the server that is connecting to the FCM server (either the HCL Traveler server or the proxy server).
- Identify a user with a device registered with FCM and send a test message via a tell
command.
- If you don't already know a user with a device registered with FCM, find a user by:
- Issuing the
tell traveler systemdump pushcommand. - opening the output file that systemdump created
- searching in the Listener Store section for a user with the Manufacturer Address and Manufacturer Provider ID set as needed.
- Issuing the
- Confirm the user has the Manufacturer Address and
Manufacturer Provider ID set as needed and get the device name
by issuing the
tell traveler push status <userName>command for the user name determined above. - For the device name and user name determined above, issue the
tell traveler push test * <deviceName> <userName>command.
- If you don't already know a user with a device registered with FCM, find a user by:
- Trying
https://oauth2.googleapis.com/tokenandhttps://fcm.googleapis.com/v1/projects/notes-traveler-2014/messages:send.By default, the requests via the browser's address bar will be HTTP GETs, but the FCM HTTP v1 API requires the requests to be HTTP POSTs. There are multiple methods to create the HTTP POST requests including the following:- In the browser's Developer Tools' console, paste
'fetch("https://oauth2.googleapis.com/token", {"body": null, "method": "POST"});'
(without the single quotes) and hit Enter/Return.
If you get a Content Security Policy failure on the fetch with method POST, first browse to https://oauth2.googleapis.com/token in the browser's current tab via the address bar and then retry the fetch with method POST in the console.
- In some (e.g. Firefox) browser's Developer Tools in the Network section, you can
resend the request after changing the method to POST or create and send a new request
that is an HTTP POST.
The request will be missing some information, so a "successful" result is an HTTP 400 (Bad Request) response.
- In the browser's Developer Tools' console, paste
'fetch("https://fcm.googleapis.com/v1/projects/notes-traveler-2014/messages:send",
{"body": null, "method": "POST"});' (without the single quotes) and hit Enter/Return.
If you get a Content Security Policy failure on the fetch with method POST, first browse to https://fcm.googleapis.com/v1/projects/notes-traveler-2014/messages:send in the browser's current tab via the address bar and then retry the fetch with method POST in the console.
- In some (e.g. Firefox) browser's Developer Tools in the Network section, you can
resend the request after changing the method to POST or create and send a new request
that is an HTTP POST.
The request will be missing the authentication credentials, so a "successful" result is an HTTP 401 (Unauthorized) response with a response body that indicates an authentication problem.
- In the browser's Developer Tools' console, paste
'fetch("https://oauth2.googleapis.com/token", {"body": null, "method": "POST"});'
(without the single quotes) and hit Enter/Return.
tell traveler push cmstatusTraveler: ########## Connection Notification Sender FCM (Tue Nov 04 06:50:43 EST 2019) ##########
Traveler: Description: Details about the connections to the Google Firebased Cloud Messaging (FCM).
Traveler: Connection to Google Firebased Cloud Messaging is activeTo verify that the connection to the FCM server is working connect an HCL Traveler for Android client from a device that is also logged in with a Google account. The HCL Traveler server will not attempt to contact FCM until it has a reason to do so.