Setting Up Push Notifications for the M-Files Mobile Apps

Note: This content is no longer updated. For the latest content, please go to the user guide for M-Files Online. For information on the supported product versions, refer to our lifecycle policy.

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 M-Files Desktop (see Editing Notification Settings in M-Files Desktop).

To enable 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

M-Files push notifications use Azure notification hubs for delivering the notifications (see Microsoft Azure Notification Hubs). You therefore need to have a valid Microsoft Azure subscription before moving forward. Visit https://azure.microsoft.com to create a subscription if you do not yet have one.

Do the following steps to create a new notification hub in Azure:

  1. Sign in to Azure Portal.
  2. Select Create a resource > Mobile > Notification Hub.
  3. In the Notification Hub field, enter a unique name.
  4. 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.
  5. Select your Location, Resource Group (if you have one already), and Subscription.
  6. 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:

  1. Sign in to Azure Portal.
  2. Select All services.
  3. Under Mobile, select Notification Hubs.
  4. From the list of notification hubs, select the hub that was created according to the instructions in Creating a notification hub in Azure.
  5. 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 at [email protected].
      or
    • Enter the Android configuration under Google (GCM). You can request the configuration settings from our customer support at [email protected].

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 via M-Files Admin, or both. The server-level settings simply do not apply to any vaults for which the connection settings have been defined via M-Files Admin.

First, you need to locate the connection details in your notification hub settings:

  1. Sign in to Azure Portal.
  2. Select All services.
  3. Under Mobile, select Notification Hubs.
  4. 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:

  1. Optional: Under the notification hub settings, select Properties.
  2. 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>
  3. Optional: Under the notification hub settings, select Access Policies.
  4. 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:

  1. Open M-Files Admin.
  2. In the left-side tree view, expand a connection to M-Files server.
  3. Expand Document Vaults.
  4. Expand a vault.
  5. Select Configurations.
  6. In the task area, select Advanced Vault Settings.
  7. Expand Notifications and select Push Notifications.
  8. 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:

  1. 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.

  2. Click Save to save your changes once you are done.

Finalize the process by doing either step 19 or steps 20 and 21, depending on where the connection settings are stored. Note that restarting the vault or the server should always be done in a controlled manner and users should be notified beforehand so that no work is lost.

  1. If you saved the connection details to the vault (see step 17), restart the vault.
    In this case, you can skip steps 20 and 21.
  2. If the connection settings are stored on the server computer (see steps from 5 to 8), restart the MFServer service as instructed in step 21.
  3. Use Windows Task Manager to restart the MFServer service:
    1. Right-click the taskbar and select Task Manager.
      Result:The Task Manager window is opened.
    2. Open the Services tab.
    3. Right-click the MFServer service and select Restart.
Your vault is now set up to send push notifications to vault users. Repeat the process for as many vaults as needed.