Migrate notifications from a service to a system app



  • RVM 6.0+ required
  • Notifications client library 0.12.10+

Starting in RVM version 6.0, OpenFin Notification Center no longer uses the OpenFin service model, and is instead implemented as a system application. With Notification Center as a system application, the Notification Center is available by default and is not terminated when the last application using it closes. This enables end-users to access previously-generated notifications, which may in turn relaunch an OpenFin application on the desktop.

To start developing apps that use system application notifications:

  1. Ensure that your RVM is 6.0+. The RVM updates automatically. You can check it programmatically using fin.System.getRvmInfo().
  2. Run npm update openfin-notifications to update the Notification Center client library to version 0.12.10 or later.
  3. In your application’s manifest file, remove the object in the services section that defines the notifications service.

For example, if the services parameter in the application manifest previously looked like this:

		“name”: “notifications”,
		“manifestUrl”: “https://myapp-location/myapp-version/app.json”
	{	“name”: “excel”	}

To run with system application notifications, it should look like this:

	{	“name”: “excel”	}



“excel” is included here as an example of another service and is not involved in notifications.

Best practice

The desktop owner controls the version of the OpenFin Notification Center available on end-user desktops. Therefore, your application could encounter a different version than the one you developed it for.

You can use the getStatus() function to get a ProviderStatus version value of the Notification Center. If the version is lower than your application supports, you should avoid sending notifications. Refer to the release notes on the OpenFin Versions page for details of features added or changed in each version.

You can also raise a message to the user saying something like “MyApp requires version X of the Notification Center to use all its features. Please contact your OpenFin administrator.”