Wednesday, September 24, 2014

Notifications Reader: Importing custom notification rule sets

With release 1.0.4 of Notifications Reader comes experimental support for adding additional predefined rule sets for some common android applications.

This feature is still under development and subject to change.

A Notification Rule Set is a collection of rules defined in a .nr-rule file.  A few initial rules sets are available below:

Facebook
Twitter
Instagram
Dropbox
Skype

You can also load the latest set of Android System and Google Apps Notification Rules. Loading this rule set will overwrite any rules changes you have made to the initial set of default rules loaded when you first installed the app.

Loading Rule Sets

To load the rule set the rule file must first be transfer to the devices storage and opened using a suitable file manager application. The file must have a .nr-rule extension. When selecting the file you should be given the option to complete action or open the file using Notification Rules. Loading rule sets from Dropbox, using the Dropbox app will also work, however trying to load notification rule files for Google Drive is known not to work at this time. Direct install from the web link is coming soon...

Reloading a rule set will overwrite any changes you have made to the rules previously loaded from the same rules file.

Creating your own rules sets

Creating a rule set is an excellent way to backup your notification rule changes, transfer rules to another device, or to create a rule set to share with others. The structure of the rule set is a simple json format with multiple rule definitions in a single json array.

Rule sets can be created directly from the Notifications Reader app by selecting one of more rules for the Rules List and choosing export and selecting a suitable app the send the export data to. Send to Dropbox for example will allow saving directly to a file (remember to save with a .nr-rule file extension to enable re-importing)

Two key attributes in the rule definition are the source and sourceId which are used to uniquely identify each rule. The source can be any value to identify the creator of the rule (along with any sub-packaging), and the sourceId must be unique within the with scope of the source. When a notification rule file is re-loaded rules matching the source/sourceId will be updated with the new rule definitions.

Share you custom rule sets

If you create any interesting rule sets share them in the comments below or send then to jabanaki@gmail.com

No comments:

Post a Comment