Setting Up Push Notifications for the M-Files Mobile Apps
Push notifications allow sending notifications from M-Files Server to iOS and Android devices that have the M-Files mobile app installed. Push notifications are sent for the same events as email notifications except for digest messages. Once they are enabled, you will receive a push notification, for instance, when a new assignment is created for you. You can also create personalized notification rules with the classic M-Files Desktop (see Editing Notification Settings in the Classic M-Files Desktop).
- in an on-premises environment or in your own cloud environment, follow the instructions provided in the sections Creating a notification hub in Azure, Setting up an Azure notification hub for push notifications, and finally Enabling push notifications in M-Files vaults.
- in M-Files Cloud, simply follow the steps from 9 to 16 under Enabling push notifications in M-Files vaults. No other changes are needed.
- Vault users should enable push notifications on their iOS or Android devices. They will receive push notifications when they are logged in to a vault that has push notifications enabled. Note that vault users do not have to keep the M-Files application running to receive push notifications from a vault, as long as they are logged in to the vault ensures that they can receive push notifications.
Before you begin, note that notifications need to be enabled on the M-Files server (see Editing Notification Settings in M-Files Admin).
Creating a notification hub in Azure
Do the following steps to create a new notification hub in Azure:
- Sign in to Azure Portal.
- Select .
- In the Notification Hub field, enter a unique name.
-
In the Create a new namespace field, enter a namespace
name.
If you do not yet have a service bus namespace, you can use the default one. It is automatically created based on the hub name, provided that the namespace name is available.If you already have a namespace that you want to create the hub in, click the Select existing link and then select Create.
- Select your Location, Resource Group, and Subscription.
- Select a suitable price tier (for details, see Notification Hubs pricing).
Setting up an Azure notification hub for push notifications
After you have created an Azure notification hub, it needs to be configured for different mobile platforms. You can find the settings for the available notification services by doing these steps:
- Sign in to Azure Portal.
- Select All services.
- Under Mobile, select Notification Hubs.
- From the list of notification hubs, select the hub that was created according to the instructions in Creating a notification hub in Azure.
-
Under Notifications Settings, do one of the following, or
both:
- Enter the iOS configuration under Apple
(APNS). You can request the
configuration settings from our customer support in M-Files Support Portal or your M-Files reseller.or
- Enter the Android configuration under Google (GCM). You can request the configuration settings from our customer support in M-Files Support Portal or your M-Files reseller
- Enter the iOS configuration under Apple
(APNS). You can request the
configuration settings from our customer support in M-Files Support Portal or your M-Files reseller.
Enabling push notifications in M-Files vaults
After you have created a notification hub and set it up for push notifications, you need to enable push notifications for the M-Files vaults in which you want them to be used, as well as to set up the connection between M-Files and the Azure notification hub. You can store the connection settings to the Windows registry of the M-Files server computer or set them separately for each vault in M-Files Admin, or both. The server-level settings are not used in any vaults for which the connection settings have been specified with M-Files Admin.
First, you need to locate the connection details in your notification hub settings:
- Sign in to Azure Portal.
- Select All services.
- Under Mobile, select Notification Hubs.
- From the list of notification hubs, select the hub that was created according to the instructions in Creating a notification hub in Azure.
If you want to store the connection details to the Windows registry of the server computer, do the following steps:
- Optional: Under the notification hub settings, select Properties.
- Optional:
Copy the value of the Name field and enter it as the value
of the following Windows registry key on the M-Files
server computer:
Key HKEY_LOCAL_MACHINE\SOFTWARE\Motive\M-Files\<version>\Server\MFServer Value name AzureNotificationHubName Value type REG_SZ Description The name of the Azure notification hub to use for delivering the notifications. Value <the notification hub name> - Optional: Under the notification hub settings, select Access Policies.
- Optional:
Copy the value of the DefaultFullSharedAccessSignature
field and enter it as the value of the following Windows registry key on the M-Files server computer:
Key HKEY_LOCAL_MACHINE\SOFTWARE\Motive\M-Files\<version>\Server\MFServer Value name AzureNotificationHubConnectionString Value type REG_SZ Description The connection string for the Azure notification hub. Value <the connection string for the notification hub>
To enable push notifications in a vault:
- Open M-Files Admin.
- In the left-side tree view, expand a connection to M-Files server.
- Expand Document Vaults.
- Expand a vault.
- Select Configurations.
- In the task area, select Advanced Vault Settings.
- Expand Notifications and select Push Notifications.
- Set the value of the Enabled setting to Yes.
If the connection details have not been stored to the Windows registry of the server computer, or if you want to vault-specifically override the server-level settings, do the following:
- Optional:
Enter the notification hub name and the connection string
as the values of the Notification Hub Name
and Connection String settings,
respectively.
To get the value for Notification Hub Name, open your notification hub settings (see steps from 1 to 4), select Properties and enter the Name value to your configuration.
To get the value for Connection String, open your notification hub settings (see steps from 1 to 4), select Access Policies and enter the DefaultFullSharedAccessSignature value to your configuration.
- Click Save to save your changes once you are done.