Buzzby Main Help

This is an application which captures notifications appearing in your phone's top line and stores them in a database on your phone. Incoming notifications can be made to play a specific sound or make some Bluetooth bands connected to your phone vibrate or buzz.

Surely I don't need to read any help
What are notifications?
What can Buzzby let me do with notifications?
There is way too much buzzing
Why don't I get any buzzes at all?
Can I get rules from other people?
I created a rule file, but only some rules appeared
What is the format of a rule file?
Can I limit saving of notifications?
Why would I limit saving of notifications?
Where is the database that Buzzby maintains?
What's in the database that Buzzby maintains?
I like manuals, tell me everything about this app

Surely I don't need to read any help

Sure you do. Here are 4 good reasons why you should:

  • 1. The help in this app is organized specifically around questions that you are likely to have when you are looking at a screen. There is a good chance you will be able to jump straight to the information you want.
  • 2. Many places react to a tap and different things happen on various parts of a line. You could patiently try everything you can think of, but it will save you time to look at the help. It might even answer a question you didn't know you wanted answered.
  • 3. Lots of the help is provided with supporting pictures to make it really clear.
  • 4. Some of the help is about details of what the app actually can and can't do and you won't always be able to guess that just by trying things.
  • What are notifications?

    Notifications are an Android mechanism for letting apps catch the phone owner's attention. The notifications are shown by Android in the phone's top line as an icon together with some text (and possibly a sound) just after the app creates the notification. In a short space of time, only the icon is left in the top line and the detail is hidden till the phone owner swipes downwards on the top line to reveal details of all unseen notifications. Many apps use notifications, especially ones that provide a hook into sites that pass on messages to their members. Notifications can also be produced from activity within the phone (things like clock alarms, battery low alarms, etc.). Notifications contain a lot of information and Buzzby saves a small part of it for each notification (mainly the textual bits) along with things like the technical name for the app that produced the notification, the time of day, and a few other things. The help for the notification tab has more detail (as does the manual).

    What can Buzzby let me do with notifications?

    Firstly, Buzzby can try buzzing a Bluetooth band connected to your phone when the notification appears so that you get to know about it straight away even in noisy environments. That's Buzzby's default operation when a notification appears. You can change that by blocking all buzzes (through the Options tab) or on groups of notifications (by creating buzz rules while on the notification tab).

    Buzzby can also play a sound when a notification arrives. There are lots of possible sounds and Buzzby provides ways to attach different sounds to different groups of notifications. You control the way Buzzby uses sounds by creating sound rules.

    Another thing Buzzby can do is to show you a history of notifications. That history could get very large over a period months and years, so Buzzby gives you way of selecting which notifications from the database are visible. The selection process (visible or not visible) is done by you creating a series of filter rules. These rules let you hide or show notifications based on criteria like what app produced the notification, whether the notification text (the ticker text) referred to something in particular, or simply just those notifications within a selected date range.

    There is way too much buzzing

    You can turn buzzing right off while you organize the buzz rules if you go to the Options tab and uncheck the box that allows buzzing to occur. The image below shows the top checkbox unchecked to stop all forms of buzzing:


    Then you can go to the notifications tab and scroll through the list looking for notifications with a green background which you feel shouldn't be buzzing you. Like this one:


    When you find one, tap on the row to get the summary panel:


    Choose the 'Buzz ....' entry

    A panel will appear and you should check the active box and the app name at the very least:


    Then exit via the 'Create new rule' button (assuming there was no rule existing already, in which case you would just check the 'Active' box). This will create a buzz rule.

    After you have created the buzz rule and you are back on the notifications tab you will notice a yellow line on the left side of the notification. The yellow line indicates that this notifcation would have buzzed before, but now a rule will stop it from buzzing:


    Why don't I get any buzzes at all?

    It might be something simple like the checkboxes on the Options tab not being set. The image below shows how the panel should look to get buzzes:

    Or, if you are expecting your watch or band to get buzzed, you will need to check the operation of your BuzzBand app.

    Can I get rules from other people?

    Yes, if someone works out a good set of rules for apps that you use and puts them in a rule file, then you can copy the file into the Buzzby folder and Buzzby will read the rules and start applying them.

    I created a rule file, but only some rules appeared

    Buzzby must have had trouble with the format of some rules. The last rule from the file in the rule list that made it into Buzzby should tell you where the problem began in the file. You should edit the file to fix the problems. Check the file syntaxhere.

    What is the format of a rule file?

    Check the file syntaxhere.

    Can I limit saving of notifications?

    Yes, go to the Options tab and tap on the 'Counters/Limits' button. By tapping on a row (ie. a particular app) you will be able to change the limit for notifications saved by Buzzby.

    Why would I limit saving of notifications?

    Normally you wouldn't, but if there are hardware or software problems, a side effect might be that unusually large numbers of notifications might be generated. Then you should limit how many are saved.

    Where is the database that Buzzby maintains?

    The database is stored in a private (unseen by other apps) area /data/data/com.neologue.buzzby/files. You can get a copy of the database put into an accessible area by closing the database from the Options tab.

    What's in the database that Buzzby maintains?

    All the notifications Buzzby sees are saved there, as well as all the rules and statistics. Preferences like whether buzzing is on or not are not saved in the database.

    I like manuals, tell me everything about this app.

    This section is the manual, where everything is in one place rather than scattered across a pile of help buttons. You will find a table of contents first, followed by the sections mentioned in the table of contents. Of course, the table of contents entries are links to the material and the heading for any material is also a link taking you back to the same spot in the table of contents.

    Table of Contents


    Introduction
    System Requirements
    Android Versions
    File Area
    User Settings
    Permissions
    Main GUI Features
    Tabs
    Menu
    Actionbar Text Selection
    Buzzby Functionality in Foreground and Background
    The Buzzby Database
    Foreground
    Background
    Menu Entries
    Additional Functions
    Current Tab Help
    App Help
    What\'s New
    About Buzzby
    Buzzby Videos on YouTube
    Purchasing
    Notification Tab
    Date Selection Area
    Notification List Area
    Tag Tab
    Tab Buttons
    Sound Selection
    Tag Name
    Tag Rules
    Rule Syntax
    Reviewing Tags
    Options Tab
    Allow Buzzing To Occur
    Only Buzz if Screen is Off
    Use Sound to Buzz
    Vibrate as well
    Pass Buzz on
    Automatically Dismiss Notifications
    Audio defaults
    Default Day Range
    Making and Using Rules
    Filter Rules
    Buzz Rules
    Sound Rules
    Text Extraction Rules
    Creating a Ruleset with a Tag
    Notification Counters and Limits
    Built-in and Buzzby Folder Rule Files
    Filter Rules
    Buzz Rules
    Sound Rules
    Extraction Rules
    Limit Rules
    Passing Buzzes to other Apps
    Appendix
    Regular Expression Syntax Definition from the Android Documentation

    End of Table of Contents



    Introduction

    Buzzby watches for notifications to appear on the top line of your phone. When a notification appears, Buzzby puts a large part of the content of the notification into a database allowing you to look back through all past notifications.

    Additionally, when a new notification appears, Buzzby looks through lists of rules created by you (and a few shipped with the app) to decide whether:

  • The notification should send you an alert (by sound, vibration and/or a Bluetooth band). The rules that drive this decision are called buzz rules.

  • The notification should play a special sound for an alert. The rules that drive this decision are called sound rules.

  • The notification should be displayed or hidden in the notification tab. The rules driving this decision are called filter rules.

  • Text should be extracted from the notification's ticker text. The rules driving this decision are called extraction rules. Extracted text can be used as part of other rules so text extraction is an important part of achieving fine control of Buzzby's operation.

  • System Requirements
    Android Versions

    The ability for apps to read notification information started with Android 4.3, so the minimum system level for Buzzby is 4.3.

    File Area

    Buzzby creates a folder on your SD card (or equivalent) called 'Buzzby'. You should be able to see the folder easily with a File Manager app, or when you plug your phone into another device. The database can be exported to this folder. It is also the folder to place a rule file created by you. Buzzby looks in this folder for a changed rule file every time it is brought to the screen.

    User Settings

    Notifications can't be seen by Buzzby until you explicitly give it permission in the 'Settings' area. This permission can not be granted during the install process. If you don't set the permission Buzzby will show a panel which can take you to the right spot in 'Settings' to enable the permission.

    Permissions

    Buzzby requests the following permissions (apart from the notification permission mentioned above):

  • Read/Write External Storage - It needs this to create the Buzzby folder and maintain the database. The app only accesses files inside the Buzzby folder (or inside the Buzzby apk file).

  • Bluetooth - It needs this to be able to talk to a Bluetooth band.

  • Receive Boot Completed - It needs this so that it automatically restarts each time you turn on your phone.

  • Device Power - This permission allows Buzzby to be informed that the power on the phone is being turned off. It needs to know this to close it's database in an orderly fashion.

  • Network and WIFI Status - This permission is only used by Buzzby if you decide to play any of the help videos as they are stored on the web. If you are not using WIFI when you try to run a Buzzby video the app warns you before running the video.

  • No other permissions are requested, so Buzzby can not do things like send data to places outside your phone or read your contacts list. Notifications do contain information that might also be in your contacts list (such as people's names), but please note that such information goes into the Buzzby database which is on the same phone as your contacts list, and the database is not visible to other applications unless you export it and leave it around.

    Main GUI Features
    Tabs

    Buzzby has 3 tabs which can be selected either from the tab header by tapping, or by swiping left or right in the body of a tab. The menu is adjusted so that the correct help for a tab can be selected via the small vertical menu bar icon in the action bar near the top right of the screen.

    Menu

    The menu provides basic help for the application, the currently visible tab, an 'About' entry with the version number, and links to the Buzzby videos on YouTube.

    Actionbar Text Selection

    When you create or modify an extraction rule without using the keyboard, the action bar takes part in the process. The action bar shows the words 'Text Selection' and two text 'handles' appear to let you choose text. Once you have moved the handles to bracket the text required you can move on to the next step in the rule modification process.

    Buzzby Functionality in Foreground and Background
    The Buzzby Database

    Buzzby creates an SQLite database in a private area for storing quite a bit of information. Mostly it is for keeping all the notifications that your phone displayed since Buzzby started running. The database can be backed up and can even be moved from phone to phone by telling Buzzby to close the database and export it. Then you can copy the Buzzby folder with the database onto another device. Since the database also contains your rules, starting Buzzby on another phone with the copied database allows you to continue from where you left off. Note that a few preferences in the 'Options' tab aren't stored in the database and need to be established again on a new phone.

    Foreground

    When Buzzby is visible it responds to user taps and swipes while at the same time performing the background functions listed below.

    Background

    At all times, the background part of Buzzby waits for new notifications. When a new notification happens, Buzzby saves it in the database, checks to see if the current buzz rules allow the notification to be passed on to a BuzzBand companion app or a sound played.

    Buzzby also checks the filter rules to see if the notification should be visible. If it should be visible, it is popped into the top of the list on the notification tab. Finally, Buzzby checks if the limit rules have pushed this kind of notification over a limit. If so, Buzzby deletes the oldest notification of the same type so that the total number of notifications of this type in the database is not over the limit.

    Menu Entries

    In this section we discuss the menu entries seen when you drop down the menu by tapping on the vertical bar that can be seen in the top right corner of the app:

    The menu that appears looks like this:

    Additional Functions
    'Filter Rules' Button

    Tapping on this button leads to a panel that contains a list of all the filter rules currently in Buzzby.

    The list provides a number of functions:

  • Make filter rules Active or Inactive. Inactive filter rules don't stop notifications from displaying. A filter rule is inactive when it's 'Active' box is not checked.

  • Make filter rules act in a reverse role. When a filter rule is reversed, it forces the matching notifications to be visible, but hides ALL other notifications (EXCEPT for notifications matching other filter rules that are also reversed).

  • Show/edit a filter rule's properties. You tap on a rule to get a panel with all the properties for the rule. You will be able to alter some choices in the rule while in the panel.

  • Delete filter rules. Note that deleting a filter rule can't be undone (except by going back to the notification tab and re-creating it).

  • When you exit the panel, a refresh of the notification list will happen if you have made any changes.

    'Buzz Rules' Button

    Tapping on this button leads to a panel that contains a list of all the buzz rules currently in Buzzby.

    The list provides a number of functions:

  • Make buzz rules Active or Inactive. Inactive rules don't stop notifications from buzzing. A buzz rule is inactive when it's 'Active' box is not checked.

  • Display/edit a buzz rule's properties. You can tap on a rule to get a panel with all the properties for the rule. You will be able to alter some choices in the rule while in the panel.

  • Delete buzz rules. Note that deleting a rule can't be undone (except by going back to the notification tab and re-creating it).

  • 'Extraction Rules' Button

    This panel will show a complete list of extraction rules:

    The rules are ordered so that keyword based rules appear first. The context based rules appear last.

    Within the keyword rules, the ordering is alphabetical by keyword. In the context rule area, rules are order first by app name and then by the left and right patterns.

    Tapping on a rule brings up a panel where you can alter some properties of the rule or delete it.

    When you exit the panel, a refresh of the notification list will happen if you have made any changes.

    'Sound Rules' Button

    The complete sound rule list is displayed.

    Items are ordered by app name first (if it was used) and then by the extracted text used in the rule.

    You can change the active state of the sound rules directly from the list.

    Tapping on a rule brings up a panel showing the full properties of the rule. From the panel you can change many of the rule's properties including the sound produced by the rule. The same panel also lets you delete the rule.

    'Counters/Limits' Button

    The panel here displays a list of all apps that have produced a notification or have a limit set on them.

    For each app the total number of notifications captured to the database is shown. If a non-zero limit is present it indicates Buzzby will limit the total number of notifications stored for that app.

    Tapping on a row in the list brings up a panel where you can change the limit value.

    Another column provides short term counts of notifications. This column resets to zero at midnight every day, or when you tap the 'Reset counters' button. Resetting the counters is something you might want to do just before going into a meeting so you can check the counters on coming out later.

    The counters update in real-time so you can leave the panel open and watch the counter numbers build as notifications occur.

    'Tag List' Button

    Tags can be attached to a group of rules that are imported from a rule file placed in the Buzzby folder.

    The tag provides a convenient way of knowing where the rules came from and for deleting a group of rules in one action. When you look at a rule's details a tag will be shown if the rule is part of a tag group.

    The Tag List panel (which appears when you tap the Tag List button in the Options tab) lists all the tags known to Buzzby. If you have never used the 'Create ruleset' button or input tagged rules from a rule file the list will be empty.

    The panel provides a short cut method for creating a set of related search terms which you want to play a specific sound when a term matches an incoming notification. See here for details on making a ruleset.

    Rule file creation and import are described below.

    'Column Selection' Button

    Buzzby saves a select subset of the information in a notification. Each of the elements within the data saved is assigned a column in the notification list, and with this button you can choose which columns are visible.

    Tapping on the button leads to a panel which lists all the available columns and shows which ones are currently visible (the ones checked).

    There are quite a few columns and most phones (even tipped sideways) won't be able to show all the columns at once, even when each column is squashed severely. Buzzby tries to size the columns based on your selection, but when space is at a premium, the result might be rather ugly.

    'Database Close/Open' Button

    This button leads to a panel where you need to confirm that you are shutting down the database (or vice versa).

    While the database is closed Buzzby is unable to save notifications or alter rules.

    Import/Export the Database

    When the database is closed or opened, there is an option to do an import (for an open) or an export (for a close).

    During a close, if you check the box for exporting, Buzzby copies the database to the public Buzzby folder. This option should be checked when you are periodically backing up your phone's data. It should also be used when you are closing down your phone for the last time in preparation for moving to a new phone. By copying the public Buzzby folder you are carrying away all the data in the Buzzby app except for a few options that were set via the Options tab.

    During an open, if you check the box for importing, Buzzby expects to find a previously exported Buzzby database in the public Buzzby folder. On finding the database Buzzby destroys the existing private database, copies the database from the public Buzzby folder to the private area and opens the private copy as the working database.

    You can make changes to the database before it is imported again provided you don't remove any tables or alter the records in the tables. You can delete history records without causing a problem for Buzzby, but you shouldn't add records into Buzzby's tables. You can also delete filter, buzz and sound rule records safely, but deleting extraction rules could cause problems for other rules.

    Current Tab Help

    The help that appears when you tap this entry depends on the currently selected tab (Tag, Notification or Options).

    App Help

    This help section provides help relating to to overall operation of the app.

    What\'s New

    As new version of Buzzby upload to to your phone, the "What\'s New" help will be adjusted to provide information on the changes made from one version to the next.

    About Buzzby

    The 'About' help provides information on the product including the version number, purchase status, etc.

    Buzzby Videos on YouTube

    Tapping on this entry will bring up the phone's browser and jump to the location in YouTube where Buzzby videos can be viewed.

    Buzzby checks whether your phone is currently connected via WiFi and warns you if WiFi is not active before starting the browser.

    Purchasing

    This menu entry is only present if the app has not yet been purchased.

    Tapping on the entry starts the purchase process.

    Notification Tab
    Date Selection Area

    The line of text and buttons immediately under the tab headers controls the range of notifications selected from the database for display. The selected date range is the main method for choosing the notifications from the database. The filter rules (determining which notifications get hidden) are applied after the notifications in the date range are gathered.

    By default, the date range extends from the present to seven days ago. The number of days is drawn from the 'Default day range' number picker on the Options tab. Whatever number that picker is showing becomes the default range. The sections below explain how to use some other date range.

    'from' Button

    If the button shows the word 'now', then the notification list is updated as notifications arrive. If the button shows a date and time, then new notifications won't be seen as they will fall outside the date range.

    When you tap the button after 'from' a panel appears with a date and a time picker:

    You can choose a date and time for the most recent notification which will be displayed. When you exit the panel using 'Save', the selected date and time will display on the 'from' button indicating that you have fixed a starting date other than the present for selecting notifications. The selected date/time will remain in force until you return to this panel and make a different choice. If you choose the 'Default' button to exit the panel, the 'from' button will be set to 'now' and the notification list will always start from the present.

    'to' Button

    The other end of the date range is set by default to the number on the 'Default day range' (on the Options tab). When operating in default mode for the 'to' date, Buzzby updates the button's date/time text whenever it is brought to the screen or forced to go back to the database and regather notifications for display (such as when a filter is made active or inactive).

    Like the 'from' button, the 'to' button will operate in default mode unless the button is tapped and a new date/time is selected in the panel that appears. The selection panel looks exactly like the one obtained from the 'from' button. If a non-default value is chosen, that value stays in force until you return to the panel and exit using 'Default'.

    When operating in default mode, the date on the 'to' button will periodically move forward to keep the range to the number of days from the present required by the number on the 'Options' tab.

    The date is displayed in YY-MM-DD HH:MM:SS format.

    Records Found Counters

    Two numbers separated by a slash are shown at the right hand end of the date area row. The first number is the number of notifications selected for display, while the second number is the number of notifications found in the date range. If the 'from' button says 'now', the numbers will update as notifications come in. The number of notifications actually displayed might be much smaller than the number found as filter rules may cause notifications to be hidden. The counters are shown in white while the notification list is not refreshing. When a refresh of the notification list is in progress the numbers will be in yellow.

    The first number will typically stop at 100 so that the refresh doesn't take too long. However, if you start scrolling through the list, Buzzby will add more items to the bottom of the list if they are available, so the 100 may grow to a larger number as you scroll down.

    Notification List Area
    Row Contents and Coloring

    Each row in the list is a single notification. Each column in the row is an item out of the notification (see the Column Selection area for a detailed list of all the possible columns). A typical row using the default column selection is shown below.

    The first thing to notice about the row is that most of it has a green background. This background coloring tells you that when the notification happened Buzzby would have tried to buzz you (assuming buzzing had not been turned off in the Options tab). A black background would indicate that the buzz rules at the time of the notification made Buzzby decide not to try to buzz you.

    If the buzz rules have changed since a notification appeared, a bright colored line will be drawn on the left side of the row. In such cases, a notification that didn't buzz will show a bright green line on the left to show that if the notification appeared now it would buzz. A notification that did buzz will show a yellow line on the left to show that if it appeared now it would not buzz.

    When a notification first appears it will have a blue bar on the left:

    The blue bar indicates you have not yet tapped on the notification. Once you tap on the notification to bring up the summary panel, the blue bar disappears.

    Now lets look at the columns in detail going from left to right. The first column shows the icon associated with the app that created this notification. Often (but not always) that's the same icon you saw when the notification appeared in the top line on your phone. It's displayed here as it's a handy way for quickly recognizing items in the list.

    The next column is the timestamp that tells you when the notification appeared. The list is sorted by timestamp so you will notice that the top item is the most recent notification and the bottom one is the oldest (within the date range selected by the buttons above the list).

    The next column is the app name. It's there because the icon is not always so recognizable.

    Next column is the ticker.

    The data shown in the ticker column is a composite of the purely textual information in the original notification posted by an application to your phone's top line. A notification has quite a few text fields inside it and they have been concatenated into this one column with a vertical bar separating them. Technically, the data that Buzzby tries to extract (in this order) is:

  • Ticker text

  • EXTRA_TITLE

  • EXTRA_TITLE_BIG

  • EXTRA_TEXT

  • EXTRA_SUMMARY_TEXT

  • EXTRA_INFO_TEXT

  • EXTRA_SUB_TEXT

  • EXTRA_TEXT_LINES

  • Often some of those fields are not present, and there may not be any vertical lines at all.

    Sometimes almost identical notifications are generated one after another by applications. Buzzby examines the ticker text from one notification to the next and quietly discards what it feels are duplicate notifications.

    The final column discussed in this section is the 'Extract' column. The information in this column is only present if an extraction rule had been applied to the notification's ticker text (with all the fields shown above) and a match on the rule allowed a chunk of the ticker text to be extracted. More often than not the extracted text is going to be somebody's name, or a topic, or a company name.

    The extracted text is usable in other rules and provides the basis for singling out notifications in useful ways.

    Tapping on a Row

    Tapping on a row brings up a rule summary panel with lots of details about the notification you tapped.

    The Rule Summary Panel

    If the notification supplies special responses and hasn't been dismissed yet, the first line shows a list of the special responses. You can tap on any of these entries in the first line and jump directly to the required response.

    The second line is a link to the application which produced the notification, and tapping the link brings up the app in the same way as if you had tapped the notification from the notification region of your phone. This link will present even if the notification has been dismissed or the phone has been turned off and on since the notification occurred. However, after the notification has been dismissed, the link may not work.

    if the notification text contained browser links, these links will be displayed as buttons. Not all notifications embed browser links in their ticker text, and the browser link lines may not be present. When the browser links are present, tapping on them brings up the default browser in the phone and sends it to the website specified by the link that was in the ticker text. Buzzby will show up to two such links. The browser link don't disappear when the phone is turned off and on again or the notification is dismissed.

    Rule Related Information

    The last four lines in the panel deal with rules. At the end of each of the four lines is a number in brackets indicating how many of that type of rule apply to the notification you tapped. In the example panel above, the notification had no filter, buzz or sound rules applying to it, but 1 extraction rule matched the notification.

    For the count at the end of a line to be non-zero requires that at least one rule matches the notification. Filter, buzz and sound rules need not be active to show as matches.

    Matching means that checked items in a rule are the same as the corresponding items in the notification. For instance, if only the app name is checked in a buzz rule, it will match all notifications from that app.

    Tapping on any of the last four lines in the panel produces a further panel used to create (or change) a rule of the selected type.

    If there were no rules matching (the count was zero) the panel displayed is set up for creating a new rule. For example, tapping the buzz rule row in the image above would produce the following panel:

    Available information from the underlying notification is filled in automatically, but the boxes are left initially unchecked. When creating the rule you need to decide which boxes you want checked. The more boxes checked the narrower the rule and so is likely to affect fewer incoming notifications.

    If the type of rule already has some matching rules for the underlying notification, then the edit panel shows you the existing rules. You can edit them, delete them, or create additional rules. The earlier image showed 2 matching extraction rules and tapping on that line produced the panel below:

    In this panel you can see the buttons for deleting the current rule, making a new one, or moving to the next rule. You can also just change the currently visible rule.

    What's Visible vs. Notification Database Content

    The notifications visible in the list on the notification tab are perhaps just a small part of the notification in the database covered by the current date range. Filter rules might reduce the number of items visible (even to the point of none being visible at all). If you feel there are notifications that should be visible, go to the 'Options' tab to view the full list of filter rules. De-activate any (or all) of them to see if you get a better result when you look at the notifications again. If all the filter rules are inactive then you are seeing all the available notifications in the current date range.

    Dynamic Updates

    If the 'from' date above the notification list is 'now' and you are looking at the top of the list, then a new notification which gets through the filter rules will pop into view as it arrives.

    If the 'from' date is not 'now', the updates won't be visible as they are outside the current date range.

    Refreshing Content

    The list contents change in response to a number of actions.

    The first action was covered in the section above this one. All other updates to the list are caused by you changing rules or the date range.

    When you change the date range, the list must be refreshed.

    When you change the default day range, the list must be refreshed. If the refresh has been done by some other action on the options panel, then a refresh is done as you move back to the notification tab.

    When you alter any filter or extraction rule, the list must be refreshed. The refresh is done as soon as you accept the change to the rule(s).

    A refresh may also be forced when Buzzby is brought to the foreground after you have used another app.

    When a notification list refresh occurs you will see the counts at the right end of the date row change to yellow until the refresh is completed. However, you can scroll around the list while it is refreshing. When the refresh completes, the counters change to white. The displayed list usually stops at 100 items to save processing time, but if you start scrolling down the list Buzzby will begin adding more items to the back of the list (provided notifications are available within the date range).

    If you force a refresh before a previous refresh has completed Buzzby abandons the unfinished refresh to start the new one.

    Tag Tab

    The tag tab provides a way of creating a set of rules in one operation.

    The tab is designed for creating rules where you want to make incoming notifications buzz if the text of the notifications contains any keywords you want to track.

    To create a tag you specifiy the sound to be played by a matching notification, a name for the tag, and the keywords you want the tag to track.

    Tab Buttons
    'Clear' Button

    The clear button resets all the fields to an initialised state.

    'Help' Button

    Launches a Help panel with information to guide construction of a tag.

    'Save' Button

    The save operation begins by checking that the tag name is new (you can't update an existing tag from this tab).

    A check is also made that there is at least one rule present.

    Finally, a check is made that the text of all rules follow the required syntax.

    If all conditions are satisfied, pairs of extraction and sound rules are created (with the new tag name on each rule) and saved in the database.

    Each rule produces one pair of rules.

    The extraction rule will be a keyword based rule with a regular expression generated from the rule text. You can find the extraction rules generated by going to the menu and choosing 'Additional functions' and then choosing 'Extraction Rules'.

    The sound rule will use the selected sound and the target notifications which match the extraction rule generated from the rule line. You can find the sound rules by going to the menu and choosing 'Additional functions' and then choosing 'Sound Rules'.

    Later, if you need to edit the tag, you can go to the menu, choose 'Additional functions' and then choose 'Tag List'. If a tag was created from the 'Tag' tab it will have only extraction and sound rules, and the same number of each. For such tags, you can tap on the tag name to get a panel which looks like the 'Tag' tab, but allows you to review/edit/delete the tag.

    Sound Selection

    The sound selection process is the same as for sound rules. You drop down the spinner to see the choices and select one:

    The selected sound will be played when an incoming notification matches any of the rules.

    Tag Name

    The tag name is used to later identify the set of rules you create.

    Each tag must have it's own unique name.

    Tag Rules

    There can be up to 9 rules for a single tag.

    Each rule defines an expression which is tested against the tickertext of incoming notifications. The selected sound is played if the tickertext matches one or more of the expressions.

    A rule can be as simple as a single word, or can be a mix of words following the syntax described in the next section.

    Rule Syntax

    You can have multiple "words" separated by a space as an 'and' operation. Use a plus sign as an 'or' operation, and parentheses to organise precedence. 'and' has precedence over 'or'.

    Some examples should help.

    "pigs might fly" uses the 'and' operator twice, so it means the tickertext must contain all three words 'pigs', 'might' and 'fly' to match this rule line.

    "pigs+might+fly" uses the 'or' operator twice, so it means tickertext containing any of the words 'pigs' or 'might' or 'fly' would match this rule line.

    "water runs+downhill" will match any tickertext which contains both the words 'water' and 'runs' or any tickertext which contains the word 'downhill'. The space takes precedence over the plus sign.

    "water (runs+downhill)" uses parentheses to overcome the natural precedence of the previous example to get an entirely different meaning. Now the rule matches any ticker text which contains both 'water' and one of either 'runs' or 'downhill'.

    Reviewing Tags

    You can see a list of all tags from the 'Tag list' button that appears when you you choose 'Aditinal Functions' from the menu:

    From the tag list you can edit any tag or look at and edit the component rules in a tag.

    Options Tab
    Allow Buzzing To Occur

    This checkbox is the top level control for any sort of buzzing.

    When the box is unchecked, no buzz activity will be done meaning that no band will be buzzed, no audio will be played, and the phone will not be vibrated by Buzzby on any notifications. If notifications should have produced a buzz of some sort, they will still be coloured green in the notification tab when they are displayed, inidcating that they should have buzzed.

    When the box is checked, then buzzing functions are enabled, but may be controlled by lower checkboxes (see below) for individual types of buzzes (eg. band buzzing might be on, but sound buzzing might be off).

    Only Buzz if Screen is Off

    If you are looking at the screen you will probably see the notification so might want to conserve the battery on the band or reduce the noise by not having a buzz while the screen is on. Checking this box will achieve that effect. It's like having the top box automatically uncheck itself when the screen goes on and check itself again when the screen goes off.

    Sometimes though you might have the screen on but the app you are using takes over the whole screen and so you can't see the notification line. For such cases you might want to have this box unchecked so that buzzing still takes place.

    Use Sound to Buzz

    If you don't have a band that can be buzzed or you want to differentiate between buzzes, then sounds can be used. The sounds can be used alone or in conjunction with band buzzes if you like.

    The buzz rules determine which notifications will buzz and this checkbox determines if a buzz includes sound.

    You can also add sound rules so that different notifications play different sounds.

    If you have headphones on, the sound from a buzz will go to the headphones.

    When headphones are being used, you will probably want to uncheck the box that allows buzzing of the band but check this box to provide sound for a buzz.

    Vibrate as well

    If you want to have the phone vibrate when a buzz event occurs, check this box.

    Just like the band and sound checkboxes, this checkbox is overridden by the top checkbox and vibration is suppressed when the top checkbox is unchecked.

    Automatically Dismiss Notifications

    Sometimes dismissing notifications from your phone's top line is an annoying chore.

    Buzzby provides this checkbox to allow automatic removal of all notifications. If this box is checked, Buzzby leaves each notification visible for 30 seconds and then dismisses it for you.

    Of course the notifications are all still saved in Buzzby's database. Provided filter rules don't stop them, notifications are visible in the notification tab. A blue line to the left of a notification indicates you have never tapped on that notification.

    Audio defaults

    When sound is turned on, any notifications which should buzz and doesn't have a sound rule associated with it will play the current default sound.

    The spinner on the Options tab is used to set the default sound:

    The built-in sound is provided as a fallback sound source since selected sources can disappear if they are renamed or moved or deleted.

    The 'No sound' option provides a way of muting all notifications except the ones that have a sound rule matching them and the sound rule selects a specific sound.

    Default Day Range

    The default day range is used as a way to choose a time range for the list on the notification tab.

    The default day range only comes into play when the first button at the top of the notification tab says 'now'. In that case, when a refresh of the notification list is done, the range selected from the database uses the current time as the top of the range and (current time - X days) as the other end of the range, where X is the number of days shown on the default day range picker on the Options tab.

    Making and Using Rules

    The rules discussed here are manipulated by tapping on rows in the notification tab (or via a button from the 'Additional Functions' entry of the menu). Limit rules are covered here.

    Filter Rules
    A Simple Case

    Filter rules are used to hide notifications that are currently of no interest.

    Setting up a rule can be done very quickly. Here is an example. Let's say we decide there are too many notifications from the Clock app and we don't want them cluttering up the notification list. The image below shows a row with one of these notifications:

    To start creating the rule, we tap on one of the clock notification and get the following panel:

    The rule summary panel shows there are no filter rules matching this notification, so we will need to create one. We tap on the 'Filter -...' button and get the following panel:

    Then we tap on the app name check box as we want all of the notifications from this app to disappear. We also check the 'Active' box to have things take effect immediately.

    Finally we exit the panel via the 'Create this rule' button. Changing or creating a rule will trigger a refresh of the notification list and you may see this for a moment or two:

    And all the Clock app notifications have gone from the list.

    Using a Reverse Rule

    Reversing a rule is for situations where you want to see all the notifications of a particular type. Suppose we just want to see nothing but notifications from the Clock, the opposite of what we just did in the previous section. Since we can't see any notifications from the Clock because we just now hid them, we have to go elsewhere to change the rule we want. The first step here is to go to the Options tab and tap on the 'Filter rules' button. The panel that pops might look like this:

    We tap in the 'Reverse' column for this rule so it looks like this:

    Finally we exit the panel using the 'Done' button, go back to the notification tab and see a tab filled with only Clock app notifications:

    To undo this, is even simpler because the notification with the filter rule is visible and you don't have to go to the Options tab to change it.

    Just tap on one of the rows, and the summary panel appears allowing you to tap the 'Filter -...' button and change the rule:

    We can uncheck the reverse box and exit through the 'Save changes' button, the list will immediately refresh and now the Clock app notifications are hidden again and the rest of the notifications have returned.

    Including Other Attributes

    Some filters will need more than just the app name to select the right set of notifications. It might be that you want a filter which targets an extracted name rather than the app name for instance. Or, you might need to combine the app name with the extracted name or the Id on the notification or all three.

    Creating more complex filters requires closer examination of groups of notifications, looking for features which can be used to distinguish the group of interest from the others.

    Here is a view of some notifications which all have the same app name but differ in some of the other attributes that are visible in the shot:

    Multiple Filter Rules for a Notification

    It's not hard to set up enough rules that some notifications will match against more than one active rule. For instance one rule might use the app name for matching and another rule might use the extracted text for a match and some notification could have both attributes.

    In such cases, if at least one matching rule is active, then the notification will be hidden. If at least one matching active rule has reversing checked, then the notification will be visible.

    Buzz Rules

    Buzz rules control which notifications will try to buzz in some way and which won't. It's always the current set of rules that determine what will happen to new incoming notifications, so something that caused a buzz in the past might no longer do so and vice versa.

    Buzz rules use the same attributes to select notifications as filters do, so the panels that create and edit buzz rules look quite similar to the panels for filter rules. However, there is no interaction between buzz rules and filter rules. Each notification is tested against the filters and then separately against the buzz rules.

    You will probably want to suppress buzzing on lots of notifications soon after installing Buzzby as the default is for notifications is to buzz. Only notifications that match active buzz rules won't buzz.

    Luckily creating a buzz rule is straightforward. When a notification buzzes but you want to suppress it, open Buzzby, find the offending notification and tap on it to bring up the summary panel. Then tap on the 'Buzz -...' entry. A panel like this will appear:

    Most rules will just need the 'Active' box checked and the app name checked. If you want to narrow the range of notifications silenced by saying only the ones with a particular extracted text should be silent, check the checkbox and tap on the extracted text spinner and check the extracted text you want included in the rule:

    We will check the boxes so that only notifications that extract the keyword "gadget" will be stopped from buzzing:

    Finally, just tap on the 'Create the rule' button and that notification will no longer cause a buzz. Also, you will see that the notification in the list has a yellow bar on the left now. This indicates that under the current buzz rules the notification would not buzz, even though previously it did (as it has a green background indicating it did buzz when it appeared).

    Just as with filter rules, it's possible to end up with multiple rules matching a single notification. The result will be similar to the filter rule case. When multiple buzz rules match a single notification then the notification will not buzz if at least one of the matching buzz rules is active. The notification will buzz if no active buzz rules match.

    Sound Rules

    Sound rules select out notifications in much the same way as filter and buzz rules. They are also created, changed and deleted in a similar fashion. Like those other rules sound rules can also be active or inactive.

    The job carried out by a sound rule is to play a sound when a matchng motification arrives. As notifications pop up on your phone's top line Buzzby checks each new notification for a match against a sound rule. If there is a match, Buzzby prepares to play the sound associated with the rule. However, whether a sound is actually played at the time depends on two checkboxes on the Options tab. If no buzzing is allowed, no sound is played. If buzzing is allowed, but sounds are not allowed, no sound is played. Apart from the checkboxes, if the notification has a matching active buzz rule, no sound will be played.

    If multiple active sound rules match an incoming notification Buzzby plays all the sounds at once.

    There are quite a range of options for sound selection:


  • Built-in Sound - A double beep which has been provided as each manufacturer's phone tends to have a different set of names for notification sounds and using our built-in beep sound ensures that we always know how to make a sound on any phone. This is the initial default sound and you will probably want to at least change the default on the Options tab. It is also the sound used if the selected sound (notification or file sound) is no longer available.

  • Notification Sound - This will be a sound from the list of sounds on your phone called Notification sounds. When you go to choose this type of sound a list will appear of Notification sounds maintained by Android. If you have played about with Notification sounds for say SMS messages you will recognize the list of available sounds as being the same.


  • Sound File - If you have a snippet of sound in an Android recognizable sound file you can select that sort of file for playing when a matching notification appears. When you go to choose a sound file a File Dialog selection panel appears and you will need to navigate through the folders till you find the sound file you have in mind. When you tap on a file to select it Buzzby plays the file. If you tap on a long file by mistake tap somewhere else to cancel the play operation.


  • Follow Default - If this option is selected, any matching notification will play the sound currently selected as the default sound on the Options tab.

  • No Sound - This option silences any matching notifications. It's an option you might want to use to temporarily or permanently silence a group of notifications

  • Making a Sound Rule

    When you are looking at the notification tab you can make a sound rule (or change an existing one) by tapping on the notification to bring up the summary panel. The line in the panel headed 'Sound -..' will take you to a panel to create a sound rule based on the notification you selected.


    Like other sorts of rule creation panels this one has an area for the selection criteria you can choose to match notifications against the rule. The last part of the panel is for selecting the sound you want played when a notification matches this rule.

    Selecting the Sound

    When you tap the spinner to open it you see the choices available for the sound:


    When you choose either 'Notifications sound' or 'Sound file' a further panel appears so you can find the sound you want. The notification sound selection process nicely allows you to hear a sample of the sound you are selecting. The sound file selection process also tries to play the file you select. If you tap on a file which is not a sound file, the select button is disabled to indicate the selection is not valid. If the file is a sound file it is played and the selection button is enabled. If you tap on a file with a long playing time, you can cancel the playing by tapping on anything else in the panel.

    Text Extraction Rules
    Types of Extraction Rules

    The extraction rules provide a way of flagging a notification, usually in order to help make the notification buzz or produce a special sound. Buzzby provides two ways of extracting text that are quite different in nature. One mechanism is closely related to the kind of search you do when using a search engine on the web. This is a keyword based extraction process and tells Buzzby to examine all notifications for a keyword (one keyword per rule). The second mechanism is called a context extraction and used if you know WHERE the text to be extracted should be, but you don't know WHAT the text will be. The most common scenario for a context extraction is pulling out a name from a particular notification type (eg. the sender's name in an SMS message). Context extractions are applied to notifications from individual apps, as the context in which something like a name appears varies from one app to another. Keyword extraction rules are applied to all notifications regardless of which app created the notification.

    When you create an extraction rule, a checkbox is provided to select whether the rule will be a keyword or context based rule. Once you have made that choice the panel restructures itself to reflect the choice.

    Keyword Extraction

    To create an extraction rule which is keyword based, find a notification which contains the keyword of interest in it's ticker text. Then, tap on the notification to get the summary panel where you can tap on the 'Extraction-...' entry to get a panel where you can start creating the rule:

    Check the box to indicate it is a keyword based rule. Choosing the text for the keyword can be done in either of two ways. One way uses a keyboard and the other doesn't. We will look at the two in turn.

    Keyword Selection via Keyboard

    If you tap on the yellowish region under the ticker text, Buzzby assumes you want to use the keyboard. If you have no keyboard, the soft keyboard will pop up and you can type the keyword in. As you type, Buzzby will highlight any match in the ticker text in green. Although we have suggested starting from a notification which already has the keyword of interest in it's ticker text, you don't have to start that way. Any notification can be used. It's just that the green highlighting won't happen if the keyword is not somewhere in the current ticker text.

    Once you have finished typing, make the keyboard go away and you will be able to see the button to complete the rule creation process.

    Keyword Selection via Edit Handles

    After checking the keyword checkbox, tap the 'Start text selection' button in the bottom right corner. A new panel appears which contains just the ticker text and a few buttons.

    Do a long press on the ticker text displayed in the panel and the selection handles will appear:

    Move the handles one at a time till they bracket the word you want to use as the keyword. Bear in mind that the matching process is very literal and using something like 'holidays' will miss notifications where the text contains "holiday" without the 's'. Or, using 'volcanic' will miss 'volcano'. The matching is much more literal than you would expect from a search engine, so you need to be prepared to use parts of words where a word might have a number of endings:

    Once you have selected the region you want for the keyword the rule can be saved. If you can't get the handles in the right place, tap the text to make the handles disappear and start with another long press. You can start again if you lose the handles accidentally too.

    After you have tapped the button in the bottom right corner another panel appears where you can review what you have selected before finally saving the rule. The keyword will show in green in the ticker text. You can abandon the rule creation process at any time by tapping the 'Don't Save' button.

    A few important point about keyword rules. First, to simplify rule creation and matching, Buzzby holds the keyword in lowercase and turns ticker text into lowercase before checking for a match. This eases the pain when matching words which might be capitalised at the start of a sentence but not somewhere in the middle. Secondly, Buzzby doesn't understand word ending differences or special character equivalents (like oe being equivalent to รถ). Try and and keep endings out of keywords. Where possible use enough of a word to get a good match (for instance use 'absail' to pick up 'absails', 'absailed', 'absailing', etc.). If you can't reasonably do that make separate rules for each version of the keyword you want.

    The final point is that keyword based rules are tested against every notification that Buzzby sees regardless of which app created the notification, so if you are looking for a name and it's spelled the same way by the Phone app and the SMS app and by Facebook and Twitter, etc, your rule matches on all of those.

    Context Extraction

    A context based extraction rule is something of an opposite to a keyword based rule. In the context based one you specify an area where the text of interest should be rather than specifying what the text is. This kind of rule is useful for picking out names or topics in notifications from apps that handle communications from a number of people or groups (eg. incoming phone call app, SMS app, Facebook, etc.).

    An example of creating a context based extraction rule appears in the following section.

    Please note that context based extraction rules are each tied to their own app as the format of notifications across different apps tends to be quite varied.

    A Built in Example

    Many notification ticker texts have a fairly rigid format with a variable section for a person's name or a title specific to that particular notification. Context based extraction rules can be used to copy that variable chunk of text out of the ticker text into a column of it's own (the 'Extract' column).

    For example, when a phone call comes in and is missed a sequence of three notifications appear:

    Notice that the caller's name appears in different places in two of the notifications. Also, the notifications where the caller's name appears have different app names.

    To simplify rule construction, context based extraction rules are attached to an app's name. When you tap on a notification to create a context based extraction rule, that rule will only operate on notifications that come from that app. You don't have to do anything to create that relationship it just happens as a by product of your creating the rule.

    The meat of a rule is how the rule looks for the text to be extracted. When you look at notifications like the ones above they often have a format where what appears just before the 'name' we are after and what appears just after the 'name' is always the same. It's those left and right same patterns that we use to define how the rule extracts the 'name' part.

    For instance the missed call notification above the name has the pattern 'Missed call from ' to the left of the name and nothing on the right. Buzzby has the rule for extracting the name built in to it, but you can see the rule by tapping on the row. The panel that appears when you choose 'Extraction - ..' from the summary panel looks like:

    The panel shows the rule (the left and right text patterns used to bracket the extracted text), the ticker text for the notification you tapped on, and how the rule would be applied to the ticker text.

    The panel displays the ticker with the left and right patterns having a yellowish background and the text that would be extracted with a greenish background. If there would be no match for this rule (so no text would be extracted), the whole ticker text has a whitish background. In our example, the right pattern is empty. Buzzby takes that to mean the right end of the ticker text.

    Selecting Patterns from Ticker Text

    Creating the left and right patterns for a rule can be done using the Android text selection mechanism, a standard Android feature, or via a keyboard. We will show this example as if it was created using the selection handles.

    The process of creating a context based rule is like doing a keyword based rule twice in a row as you have to do the left side of the area you want and the right side after that.

    If you use a keyboard for left and right sides the whole selection process happens in one panel with a following review panel as a check.

    If you use the Android selection handles you go through three panels first choosing the left side on a panel, the choosing the right side on the next panel and finally reviewing the results on a final panel.

    Using the Extract Field in Other Rule Types

    Once an extraction rule is in place and extracting text, the extracted text can be incorporated in buzz or filter rules. For instance you can prevent calls from a particular person from buzzing you, or create a reverse filter to show just those notifications associated with a particular person.

    Here is an example of a reverse filter being created by tapping on the missed call which will show all missed calls from that person. The filter shows just those because missed calls are produced by the Phone app while incoming calls are produced by the Phone Dialer app so even though both incoming calls and missed calls extract the same person's name, our filter rule will only apply to missed calls that have the person's name extracted.

    How do we know which app produces what? Only by looking through the notifications and drawing conclusions from what you find there. Apps do tend to be consistent in their usage and behavior so it takes just a few samples of notifications from an app before you will get a picture of how it lays out the text you want.

    Multiple Rules for a Notification

    Can multiple rules apply to a single notification? Yes, it's certainly possible to end up with that. When multiple extractions occur for one notifications Buzzby tacks them together with a "|" character separating them. You can build other rules on combinations of the extractions if you want to as the separate bits will appear in a spinner when you are designing a rule.

    Designing a Context Extraction Rule

    First we should say something about how Buzzby uses the left and right patterns as the way in which it works with them needs to become part of how you think about choosing the patterns.

    When trying to do an extraction from some ticker text, Buzzby always starts at the left hand end of the ticker text and works towards the right hand. This happens even if the ticker text is in a language which is read from right to left! Buzzby isn't reading the text just looking for matches so the reading direction doesn't really matter, although it certainly is important for the person designing the rule to know.

    The next thing to bear in mind is that the left and right patterns should be long enough to avoid unexpected matches. Let's look at an example to make this clear. Suppose we see a notification with the ticker text:

    Today is Friday and the winner is Dianna Girdot who is in Finance in Fresno

    We want to extract the name that appears in this ticker text and others like it. We have looked at a number of notifications like this and the part of the ticker before the name is always the same and the 'who is in' text always follows the name.

    What should the left pattern be? We could try just 'is ' because that appears immediately before the name. But that would not work. The problem is that the same pattern appears earlier in the line and Buzzby starts looking right from the leftmost character of the ticker. So instead of getting 'Dian....' we would get 'Friday and....'.

    By using a longer left pattern we can overcome the problem. A left pattern of 'er is ' is more than enough to get us out of trouble.

    For a right pattern we can use ' who ' as that is very unlikely to appear as part of the name (Buzzby starts looking for the right pattern immediately after the end of the left pattern).

    Regular Expressions in an Extraction Rule

    Many of the extraction rule problems go away if the matching process is more intelligent and computing systems have for a long time used a scheme called 'Regular Expressions' for obtaining a more flexible matching process.

    When you check the 'Regex' box, Buzzby assumes you are going to type in the expression (rather than use the Android text copying handles). When you tap on the text to the left of the rule text or the yellow rule text area Buzzby brings up the soft keyboard if no physical keyboard is available.

    As you type the rule Buzzby will indicate when the rule is valid or invalid on a character by character basis. A green bar appears on the left of the rule when the rule text is a valid regular expression, and a red bar while the expresion is invalid. The ticker text shows the result of the match whenever the expression is in a valid state.

    Here is the rule fixed and used in a reverse filter to pick out just notifications that mention great white sharks

    If your rule contains 'groups' (check the syntax for regular expressions if you are not sure what a 'group' is), then Buzzby outputs a concatenation of the groups (separated by a space between each group) as the result of the match when the rule matches some ticker text.

    As an example this rule ((?=.*([Dd]rone))(?=.*([fF]ootage))|(?=.*([vV]ideo))) matches any ticker text that contains the word 'drone' along with the word 'footage' or 'video' (or both) in any order. Below is an image where a notification managed to match against the rule as you can see in the extraction column:

    You can read about regular expressions online and there are plenty of tutorials about. The particular syntax used by Android has been included here in the Appendix of this manual in case you can't get online when you need it!

    Creating a Ruleset with a Tag

    When you have a specific keyword based search to do, use the 'TAG' tab.

    You can also create new tags while reviewing existing ones in the tag list panel accessed from the 'Additional Functions' menu entry.

    Tapping the 'Tag list' button leads to a panel designed to make the construction of a keyword based search much easier than building a set of extraction rules one by one and then building sound rules to go with them. The 'Create ruleset' panel will put all this together for you with a minimum of input.

    The other aspect of using this panel is that the resulting rules the panel creates are tagged with a name so that you can delete the group of rules in one action when you no longer want the search done.

    The panel provides a spot for choosing a sound. The sound will be played when a notification matches any of the keyword expressions you enter on the lines headed 'Rule 1' to 'Rule 9'.

    The 'Tag name' line provides a way of naming your search.

    The 'Rule...' lines are treated as alternatives for matching. A notification matching any one line will cause the sound to be played.

    A sample panel is shown below:

    In this example we are waiting for notifications which mention anything to do with volcanoes in Greenland. In the example we assume we are picking up news in English and German so we are searching for matches in both languages. Just as in keyword extraction rules, we use only enough of each keyword to help us match similar words (eg. seismic, seismologist, seismology, etc.).

    The rule generator takes words separated by spaces on one line as a requirement for matching all words. A match only occurs for rule 1 if the tickertext of a notification contains both "volcan" AND "greenland".

    The rule generator lets us form alternatives using the vertical bar character '|', and also allows parentheses to group terms. We could have written rule 1 and rule 2 in single line as:

        (volcan|seism) greenland

    The parentheses are there to ensure that we get the correct binding. If we had written

        volcan|seism greenland

    then it would have meant "look for a tickertext which contains 'volcan' or a tickertext which contains 'seism' AND 'greenland' together".

    Notification Counters and Limits

    Buzzby keeps a note of the total number of notifications it has from each app. It can limit the total number if necessary.

    The statistics provide an interesting and sometimes valuable view of what is happening on your phone.

    Browsing the statistics can reveal problems and should be an early port of call if your phone has any mysterious issues such as battery drainage or excess data usage. Often an increase in notifications accompanies new problems.

    Looking at the Counters

    The counter information and limit management is done from the panel produced when you tap on the 'Counter/Limits' button on the Options tab.

    The list produced is an alpabetical list of apps.

    Tapping on a row brings up a panel where you can change the limit for an app. A limit value of zero means no limit is set. A non-zero value tells Buzzby to start throwing away the oldest notifications from the app to keep it's total at or below the limit.

    Notification Totals

    The column labelled 'Totals' contains the number of notifications Buzzby has seen from each app since Buzzby was first started.

    For some apps the totals might appear smaller than you expect. This will usually be because Buzzby can only count notifications not events and some apps only generate a notification for an event when the app is not at the front of the screen or when the screen is off.

    Counters and Resets

    The column labelled 'Counter' contains short term counts of notifications from each app.

    If you do nothing, the counters reset at midnight each day and so the column shows you how many notifications appeared today for each app.

    If you tap the 'Reset' button on this panel, the counters are all set to zero allowing you to count notifications from a particular point in time. The counters will still reset at midnight though.

    How Limits Work

    When a notification arrives, Buzzby puts it in the database. If a limit is set for that app, the total count is checked. If the total is greater than the limit, Buzzby finds the oldest notification from the app in the database and deletes it.

    Setting and Changing Limits

    You can move the limit value up or down from the panel when you tap on an app in the counters/limits list.

    If you drastically decrease a limit Buzzby does not delete the excess notifications in one hit as that could be a very time consuming process. Rather it chips away at the oldest notifications for the app over a period of time till the total for the app falls below the limit.

    Built-in and Buzzby Folder Rule Files

    Buzzby has a number of rules already created when you start it up for the first time. You can add to these rules (or delete/alter the built-in ones) via panels in the app. But, you can also add rules by putting a text file in the Buzzby folder. Buzzby watches this folder and checks every time it comes onto the screen to see if a rule file has appeared or has a new modification date. Any such change triggers Buzzby to read the file and add any rules there into the database (where rules are kept along with notifications).

    Buzzby recognizes the rule file by name, it should be called BuzzbyRules.xml. Please note that the name is case sensitive.

    In this section we discuss the format of the rules in the file that Buzzby understands.

    Using a file for rule creation is good if you want to share some rules with others.

    A rule file is a plain text file in XML format, so you might want to create and edit it in a text editor that understands XML format as that reduces the chances of Buzzby being unable to read the file and rejecting the rules you have created.

    If the rule file is not in the defined format (has a syntax error as they say in the programming world) then all the rules from the error point onwards will be ignored by Buzzby. So generally you can see where an error occurred by noting which rules failed to get picked up.

    Correcting a file with an error and then starting Buzzby will be enough to make Buzzby try to read the rules in the file again. Rules that had already been accepted (those in front of the point where the error appeared) will just be replaced by a new copy of themselves.

    Since Buzzby doesn't keep track of what rules you deleted using the panels, please be aware that (depending on the past history of rule modification) by reading in a rule file you might suddenly see a rule re-appear because the rule file contains a rule you had previously deleted.

    Another important thing about rule file contents is that everything (including values in double quotes) is case sensitive.

    The rule file should start with the following line:

    <?xml version="1.0" encoding="utf-8"?>

    The first line in the file tells Buzzby the file contains XML data and should be exactly as shown above. The lines following will be rules in the formats described below for each rule type. A rule takes one line. Rules can appear in any order.

    Filter Rules

    Let's look at an example first, and get a feeling for the format and content before we describe the precise nature of the syntax. Here is a sample (actually part of the built-in file that's buried inside the app):

    <filter appname="Android System"/>
    <filter appname="Settings"/>
    <filter appname="Clock" extractedname=""/>

    Buzzby would read these and make 3 active filter rules that would hide any notifications which matched the app names shown. Except for the rule on the last line. That one has a rule with two parts: the app name and the extracted name. Notifications which have the same app name AND didn't match any extraction rules (we are using an empty string as a synonym for not getting an extraction match) will be hidden by this rule. In the first 2 rules it was enough for a notification to match the app name (regardless of whether an extraction match was able to extract any text) to be hidden.

    Now let's look at the syntax in detail. Each rule has the form:

    <filter {attribute list} />

    where an '{attribute list}' is one or more attributes separated by spaces. You can see from the example above all the attributes take the form:

    "{attribute name}"="{attribute value}"

    The possible attributes and their range of values are listed in the table below along with some guidance on using them.

    Attribute Name Possible Values Guidance
    appname Any app name. The app name should match exactly in characters and case the way it appears in a notification.
    packagename Any package name or first part of package name (eg. com.android.phone or com.android to reference all packages that start with com.android). Sometimes the app name is too broad and you need to target a package within an app (eg. a package inside 'Android System'). You can broaden package name coverage by leaving trailing parts of the package name off. If you use less than the full package name, you should also use the attribute "partpackagename" with a value of "1".
    id A number you have seen in notifications of the type you are trying to hide with this rule Note that you don't always have to use the Id as an element of a filter, only when you want some notifications with the same app name to remain visible while others are hidden and the ones you want hidden have an Id different to the ones you want to remain visible.
    extractedname The extracted text you are targeting with this filter rule. When you use an empty string ("") for the extracted name in the rule it means you are targeting notifications which DID NOT match any extraction rules.
    partpackagename the value should be "1" Include this attribute if the rule contains a package name but its just the leading part of a package name.
    use_extrule the value should be "1" Indicates that this filter rule contains a reference to an extraction rule rather than the text which is extracted when the rule matches a notification. For this field to function properly you will need to add more fields to fully specify the extraction rule that this filter rule should match against. The fields in this table beginning with "extrule_" are available for specifying which extraction rule you intend should be used as part of the filter rule.
    extrule_app Any app name Include this attribute if the extraction rule you want to cite is a context based rule rather than a keyword one.
    extrule_keyword the value should be "1" Include this attribute if the extraction rule you want to cite uses a keyword rather than context based extraction.
    extrule_regex the value should be "1" Include this attribute if the extraction rule you want to cite uses regular expressions for matching.
    extrule_left Any text Include this attribute if the extraction rule you want to cite has the characters shown as the left string. Use the left string for keyword based extraction rules also.
    extrule_right Any text Include this attribute if the extraction rule you want to cite is context based and has the characters shown as the right string. This entry is not used if the rule is keyword based.
    tag Any text Include this attribute when you want to tag a group of rules as all belonging to a single group.

    Buzz Rules

    When you look at the format of the entries you will see they are almost exactly the same as the filter rules. Filter and Buzz rules target the same information in notifications in the same way, the two types of rules only differ in effect. The filter rules hide or show notifications, the buzz rules allow notifications to buzz or not.

    Let's look at an example first and get a feeling for the format and content before we describe the precise nature of the syntax. Here is a sample (actually part of the built-in file that's buried inside the app):

    <buzz appname="Android System" />
    <buzz appname="Twitter" extractedname="" />
    <buzz appname="Clock" extractedname="" />

    Buzzby would read these and make 3 active buzz rules that would prevent buzzing by any notifications which matched the app names (for the first rule) and also the extracted name (for the last 2 rules). Again, as in the filter rule example, the last two rules will only match notifications from the apps when no extraction rule matched the notification as well.

    Now let's look at the syntax in detail. Each rule has the form:

    <buzz {attribute list} />

    where an '{attribute list}' is one or more attributes separated by spaces. You can see from the example above all the attributes take the form:

    "{attribute name}"="{attribute value}"

    The possible attributes and their range of values are listed in the table below along with some guidance on using them.

    Attribute Name Possible Values Guidance
    appname Any app name. The app name should match exactly in characters and case the way it appears in a notification.
    packagename Any package name or first part of package name (eg. com.android.phone or com.android to reference all packages that start with com.android). Sometimes the app name is too broad and you need to target a package within an app (eg. a package inside Android System). You can broaden package name coverage by leaving trailing parts of the package name off. If you use less than the full package name, you should also use the attribute "partpackagename" with a value of "1".
    id A number you have seen in notifications of the type you are trying to hide with this rule Note that you don't always have to use the Id as an element of a filter, only when you want some notifications with the same app name to remain visible while others are hidden and the ones you want hidden have an Id different to the ones you want to remain visible.
    extractedname The extracted text you are targeting with this filter rule. When you use an empty string ("") for the extracted name in the rule it means you are targeting notifications which DID NOT match any extraction rules.
    partpackagename The value should be "1" Include this attribute if the rule contains a package name but its just the leading part of a package name.
    use_extrule The value should be "1" Indicates that this buzz rule contains a reference to an extraction rule rather than the text which is extracted when the rule matches a notification. For this field to function properly you will need to add more fields to fully specify the extraction rule that this buzz rule should match against. The fields in this table beginning with "extrule_" are available for specifying which extraction rule you intend should be used as part of the buzz rule.
    extrule_app Any app name Include this attribute if the extraction rule you want to cite is a context based rule rather than a keyword one.
    extrule_keyword The value should be "1" Include this attribute if the extraction rule you want to cite uses a keyword rather than context based extraction.
    extrule_regex The value should be "1" Include this attribute if the extraction rule you want to cite uses regular expressions for matching.
    extrule_left Any text Include this attribute if the extraction rule you want to cite has the characters shown as the left string. Use the left string for keyword based extraction rules also.
    extrule_right Any text Include this attribute if the extraction rule you want to cite is context based and has the characters shown as the right string. This entry is not used if the rule is keyword based.
    tag Any text Include this attribute when you want to tag a group of rules as all belonging to a single group.

    Sound Rules

    Let's look at an example first, and get a feeling for the format and content before we describe the precise nature of the syntax. Here is a sample:

    <sound appname="Twitter" extractedname="nail polish" soundtype="0"/>
    <sound appname="Twitter" extractedname="iceland" soundtype="1" soundinfo="content://media/internal/audio/media/18"/>
    <sound appname="Twitter" extractedname="NASA" soundtype="2" soundinfo="/storage/emulated/0/Buzzby/trombones.mp3"/>

    Buzzby would read these and make 3 active sound rules that would change the sound played for any notifications which matched the app names and also the extracted text.

    Sound rules are the same as filter and buzz rules when it comes to matching notifications, so you can use the same attribute pairs to select what matches the rule. But with sound rules you need to tell Buzzby what sound should be played when a match occurs. So each sound rule has at least a "soundtype" attribute and possibly a "soundinfo" attribute (when more information is needed for a sound type).

    The first example rule uses the Buzzby built-in sound ("soundtype"="0") and so there is no other description of the sound required.

    The second rule uses a Notification sound ("soundtype"="1") and so the rule needs to specify which sound is to be used. The 'soundinfo' entry shows you the general format for specifying ringtones, although the number for a given tone might be different on different phones.

    The third rule specifies a sound file ("soundtype"="2") and the soundinfo entry tells Buzzby where the file is and the file name.

    Now let's look at the syntax in detail. Each rule has the form:

    <sound {attribute list} />

    where an '{attribute list}' is one or more attributes separated by spaces. You can see from the example above all the attributes take the form:

    "{attribute name}"="{attribute value}"

    The possible attributes and their range of values are listed in the table below along with some guidance on using them.

    Attribute Name Possible Values Guidance
    appname Any app name. The app name should match exactly in characters and case the way it appears in a notification.
    packagename Any package name or first part of package name (eg. com.android.phone or com.android to reference all packages that start with com.android). Sometimes the app name is too broad and you need to target a package within an app (eg. a package inside Android System). You can broaden package name coverage by leaving trailing parts of the package name off. If you use less than the full package name, you should also use the attribute "partpackagename" with a value of "1".
    id A number you have seen in notifications of the type you are trying to hide with this rule Note that you don't always have to use the Id as an element of a filter, only when you want some notifications with the same app name to remain visible while others are hidden and the ones you want hidden have an Id different to the ones you want to remain visible.
    extractedname The extracted text you are targeting with this filter rule. When you use an empty string ("") for the extracted name in the rule it means you are targeting notifications which DID NOT match any extraction rules.
    partpackagename The value should be "1" Include this attribute if the rule contains a package name but its just the leading part of a package name.
    use_extrule The value should be "1" Indicates that this sound rule contains a reference to an extraction rule rather than the text which is extracted when the rule matches a notification. For this field to function properly you will need to add more fields to fully specify the extraction rule that this sound rule should match against. The fields in this table beginning with "extrule_" are available for specifying which extraction rule you intend should be used as part of the sound rule.
    extrule_app Any app name Include this attribute if the extraction rule you want to cite is a context based rule rather than a keyword one.
    extrule_keyword The value should be "1" Include this attribute if the extraction rule you want to cite uses a keyword rather than context based extraction.
    extrule_regex The value should be "1" Include this attribute if the extraction rule you want to cite uses regular expressions for matching.
    extrule_left Any text Include this attribute if the extraction rule you want to cite has the characters shown as the left string. Use the left string for keyword based extraction rules also.
    extrule_right Any text Include this attribute if the extraction rule you want to cite is context based and has the characters shown as the right string. This entry is not used if the rule is keyword based.
    tag Any text Include this attribute when you want to tag a group of rules as all belonging to a single group.
    soundtype The values can be 0 through to 4 (in double quotes) O=Buzzby built-in sound, 1=Ringtone, 2=Soundfile, 3=Follow default, 4=No sound.
    soundinfo The value should be a path to some audio content for types 1 and 2 and can be left out for other soundtypes For a ringtone the soundinfo should look like "content://media/internal/audio/media/16". For a sound file it should be like "/storage/emulated/0/Music/note2.mp3".

    Extraction Rules

    Here is a sample (actually part of the built-in file that's buried inside the app):

    <extraction appname="Twitter" patternleft="" patternright=":"/>
    <extraction appname="Google Dialler" patternleft="" patternright="|Incoming"/>
    <extraction appname="Phone" patternleft="Missed call from " patternright=""/>
    <extraction appname="Download Manager" patternleft="" patternright="|100%"/>
    <extraction appname="Clock" patternleft="Alarm|" patternright=""/>

    You can see that these rules are a little different to the previous rules. It's worth noting that where you see an empty pattern (""), it represents the start of the ticker text being matched when it's a left pattern, and the end of the ticker text when it's a right pattern.

    Now let's look at the syntax in detail. Each rule has the form:

    <extraction {attribute list} />

    where an '{attribute list}' is one or more attributes separated by spaces. You can see from the example above all the attributes take the form:

    "{attribute name}"="{attribute value}"

    The possible attributes and their range of values are listed in the table below along with some guidance on using them.

    Attribute Name Possible Values Guidance
    appname Any app name. The appname attribute should be left out for keyword based rules.
    patternleft Some text to the left of the text you want to extract. If you are trying to extract text right from the start of the ticker then the left pattern will be "". For a keyword based rule the left pattern is used as the keyword.
    patternright Some text to the right of the text you want to extract If you are trying to extract text right up to the end of the ticker then the right pattern will be "". The right pattern should be left out for keyword based rules.
    keyword The value should be "1" Include this entry when a rules is to be keyword based. The left pattern is taken as the keyword for the rule. The patternright is not required or used in keyword rules.
    regex The value should be "1" Indicates the patterns are regular expressions rather simple character sequences.

    An example using regular expressions is shown below:

    <extraction appname="Twitter" patternleft="" patternright="[:\|]" regex="1"/>

    The example above is used to deal with notifications which sometimes have a ":" in the first text section which provides the name of the group supplying the notification, but occasionally notifications appear where the first text section doesn't have a ":" instead, when Buzzby comes to the end of the first text section it inserts a "|" and adds further text from the notification. The regular expression picks up the first ":" or "|" as the indication of the end of the name to be extracted.

    Limit Rules

    Let's look at an example first, and get a feeling for the format and content before we describe the precise nature of the syntax. Here is a sample (actually part of the built-in file that's buried inside the app):

    <limit appname="Buzzby" limit="500" />
    <limit appname="System UI" limit="500" />
    <limit appname="Android" limit="500" />

    Limit rules are provided so that your database doesn't accidentally grow beyond reasonable bounds. The limit rules target app names and set an upper bound on how many notifications from that app should be kept in the database. When a notification arrives that would cause a limit to be exceeded, Buzzby deletes the oldest notification from the same app as it inserts the new notification.

    There are few reasons for having limits like these. First not all notifications are terribly interesting in retrospect. For instance we don't (except for some specialists!) really need to keep notifications for download reaching 10%, then 20%, then..... Next there are some hardware malfunctions which cause large numbers of notifications to be created. During Buzzby testing an SD card in one phone started failing producing reams of failure notifications. In the space of two days more than 3,000 notifications were logged in the phone's notification database. Strangely, from the owner's viewpoint the only noticeable difference was that the battery went flat very quickly and what looked like a reminder about an SD card problem. Finally, what can happen to hardware can also happen to software, and you may need to block notifications if a package gets caught in a loop and starts generating large numbers of notifications.

    Now let's look at the syntax in detail. Each rule has the form:

    <limit {attribute list} />

    where an '{attribute list}' is one or more attributes separated by spaces. You can see from the example above all the attributes take the form:

    "{attribute name}"="{attribute value}"

    The possible attributes and their range of values are listed in the table below along with some guidance on using them.

    Attribute Name Possible Values Guidance
    appname any app name.
    limit The maximum number of notifications from this package you will allow in the database. Numbers in the hundreds or thousands should be safe to use here. A zero means no limit.
    Passing Buzzes to other Apps

    The function described here is a mechanism for informing other apps when Buzzby sees a notification which is supposed to buzz. Any tifications which don't produce a buzz won't come through here. The only items passed on here are notifications which got through the buzz rules and the checkboxes that control buzzing.

    The reason for providing such a function is that Buzzby can't know about all the possible devices that could be buzzed. In particular there are many Bluetooth 4.x devices each one having it's own way of accepting notifications. There might also be other device types using IR or WiFi that could deal with a notification given the right interface application.

    Passing Notifications On

    Buzzby broadcasts an Android Intent for any notifications that passes the buzz rules. Apps can use the Intent to buzz another device.

    If no apps are listening for the Intent, the Intent is just discarded by Android.

    The Intent sent out by Buzzby contains information not only about the notification which triggered the Intent, but also information about how Buzzby processed the notification (eg. results from matching extraction rules). The listening app can use the extra information to refine it's actions for the notification.

    Intent Contents

    The Intent uses the action "com.neologue.buzzby.Notification" which should be quoted in listening app's receiver entry in it's manifest:


       <intent-filter>
           <action android:name="com.neologue.buzzby.Notification">
           </action>
       </intent-filter>

    The Intent contains the following Extra entries:

  • "Notification" - the complete notification object.

  • "AppName" - the name of the app for the activity that generated the notification.

  • "PackageName" - the package name of the activity generating the notification.

  • "TickerText" - the ticker text as put together by Buzzby from fields in the notification.

  • "ExtractedText" - resulting from any extraction rule matches. If no rules matched this entry is an empty string.

  • "SoundType" - this will be a single digit number (as a String) with values as defined in the sound rules section where the rule file is described.

  • "SoundInfo" - the string pointing to the media to be played. The entry may be an empty string.

  • The Sample App

    A sample application have been placed on GitHub for use as a template for creating new listening apps.

    The sample app has a small GUI interface as well as a server component to listen for Intents from Buzzby while in background.

    The sample (for the SOLEUS GO! Bluetooth 4.0 band) is here.

    Appendix
    Regular Expression Syntax Definition from the Android Documentation

    Regular expression syntax

    Java supports a subset of Perl 5 regular expression syntax. An important gotcha is that Java has no regular expression literals, and uses plain old string literals instead. This means that you need an extra level of escaping. For example, the regular expression \s+ has to be represented as the string "\\s+".

    Escape sequences

    \ Quote the following metacharacter (so \. matches a literal .).
    \Q Quote all following metacharacters until \E.
    \E Stop quoting metacharacters (started by \Q).
    \\ A literal backslash.
    \uhhhh The Unicode character U+hhhh (in hex).
    \xhh The Unicode character U+00hh (in hex).
    \cx The ASCII control character ^x (so \cH would be ^H, U+0008).
    \a The ASCII bell character (U+0007).
    \e The ASCII ESC character (U+001b).
    \f The ASCII form feed character (U+000c).
    \n The ASCII newline character (U+000a).
    \r The ASCII carriage return character (U+000d).
    \t The ASCII tab character (U+0009).

    Character classes

    It's possible to construct arbitrary character classes using set operations:
    [abc] Any one of a, b, or c. (Enumeration.)
    [a-c] Any one of a, b, or c. (Range.)
    [^abc] Any character except a, b, or c. (Negation.)
    [[a-f][0-9]] Any character in either range. (Union.)
    [[a-z]&&[jkl]] Any character in both ranges. (Intersection.)

    Most of the time, the built-in character classes are more useful:
    \d Any digit character (see note below).
    \D Any non-digit character (see note below).
    \s Any whitespace character (see note below).
    \S Any non-whitespace character (see note below).
    \w Any word character (see note below).
    \W Any non-word character (see note below).
    \p{NAME} Any character in the class with the given NAME.
    \P{NAME} Any character not in the named class.

    Note that these built-in classes don't just cover the traditional ASCII range. For example, \w is equivalent to the character class [\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}]. For more details see Unicode TR-18, and bear in mind that the set of characters in each class can vary between Unicode releases. If you actually want to match only ASCII characters, specify the explicit characters you want; if you mean 0-9 use [0-9] rather than \d, which would also include Gurmukhi digits and so forth.

    There are also a variety of named classes:

    • Unicode category names, prefixed by Is. For example \p{IsLu} for all uppercase letters.
    • POSIX class names. These are 'Alnum', 'Alpha', 'ASCII', 'Blank', 'Cntrl', 'Digit', 'Graph', 'Lower', 'Print', 'Punct', 'Upper', 'XDigit'.
    • Unicode block names, as accepted as input to forName(String), prefixed by In. For example \p{InHebrew} for all characters in the Hebrew block.
    • Character method names. These are all non-deprecated methods from Character whose name starts with is, but with the is replaced by java. For example, \p{javaLowerCase}.

    Quantifiers

    Quantifiers match some number of instances of the preceding regular expression.
    * Zero or more.
    ? Zero or one.
    + One or more.
    {n} Exactly n.
    {n,} At least n.
    {n,m} At least n but not more than m.

    Quantifiers are "greedy" by default, meaning that they will match the longest possible input sequence. There are also non-greedy quantifiers that match the shortest possible input sequence. They're same as the greedy ones but with a trailing ?:
    *? Zero or more (non-greedy).
    ?? Zero or one (non-greedy).
    +? One or more (non-greedy).
    {n}? Exactly n (non-greedy).
    {n,}? At least n (non-greedy).
    {n,m}? At least n but not more than m (non-greedy).

    Quantifiers allow backtracking by default. There are also possessive quantifiers to prevent backtracking. They're same as the greedy ones but with a trailing +:
    *+ Zero or more (possessive).
    ?+ Zero or one (possessive).
    ++ One or more (possessive).
    {n}+ Exactly n (possessive).
    {n,}+ At least n (possessive).
    {n,m}+ At least n but not more than m (possessive).

    Zero-width assertions

    ^ At beginning of line.
    $ At end of line.
    \A At beginning of input.
    \b At word boundary.
    \B At non-word boundary.
    \G At end of previous match.
    \z At end of input.
    \Z At end of input, or before newline at end.

    Look-around assertions

    Look-around assertions assert that the subpattern does (positive) or doesn't (negative) match after (look-ahead) or before (look-behind) the current position, without including the matched text in the containing match. The maximum length of possible matches for look-behind patterns must not be unbounded.

    (?=a) Zero-width positive look-ahead.
    (?!a) Zero-width negative look-ahead.
    (?<=a) Zero-width positive look-behind.
    (?<!a) Zero-width negative look-behind.

    Groups

    (a) A capturing group.
    (?:a) A non-capturing group.
    (?>a) An independent non-capturing group. (The first match of the subgroup is the only match tried.)
    \n The text already matched by capturing group n.

    See group() for details of how capturing groups are numbered and accessed.

    Operators

    ab Expression a followed by expression b.
    a|b Either expression a or expression b.

    Flags

    (?dimsux-dimsux:a) Evaluates the expression a with the given flags enabled/disabled.
    (?dimsux-dimsux) Evaluates the rest of the pattern with the given flags enabled/disabled.

    The flags are:
    i CASE_INSENSITIVE case insensitive matching
    d UNIX_LINES only accept '\n' as a line terminator
    m MULTILINE allow ^ and $ to match beginning/end of any line
    s DOTALL allow . to match '\n' ("s" for "single line")
    u UNICODE_CASE enable Unicode case folding
    x COMMENTS allow whitespace and comments

    Either set of flags may be empty. For example, (?i-m) would turn on case-insensitivity and turn off multiline mode, (?i) would just turn on case-insensitivity, and (?-m) would just turn off multiline mode.

    Note that on Android, UNICODE_CASE is always on: case-insensitive matching will always be Unicode-aware.

    There are two other flags not settable via this mechanism: CANON_EQ and LITERAL. Attempts to use CANON_EQ on Android will throw an exception.

    Implementation notes

    The regular expression implementation used in Android is provided by ICU. The notation for the regular expressions is mostly a superset of those used in other Java language implementations. This means that existing applications will normally work as expected, but in rare cases Android may accept a regular expression that is not accepted by other implementations.

    In some cases, Android will recognize that a regular expression is a simple special case that can be handled more efficiently. This is true of both the convenience methods in String and the methods in Pattern.