Push Notification extension

With Push Notification extension, you can send Push Notifications to your iOS, Android or Desktop devices. With this you can trigger alerts / notifications for important things happening in your system. You can do this both in interactive reports and in Scheduled reports.

Following Push Notification services are supported (you need to download the respective app to your device from the app store):

Configuration

Configuration is done via user/extension_init.php. The $mydbr_push array contains the 'sender' key which marks the default service you are going to use (you can override it in a report using dbr.push.options). For Pushover and Pushbullet, you will need an app/access token which identifies you as a sender.

$mydbr_push = array( 
  'sender'  => "pushover", // Default sender: pushover, pushbullet, prowl
  'pushover_app_api_token'  => "APP_TOKEN",
  'pushbullet_access_token'  => "ACCESS_TOKEN"
);

Commands

dbr.push - Send a push message
dbr.push.sender - Choose another sender than the one defined in $mydbr_push init
dbr.push.option - Set a service specific option
dbr.push.notify_successful_push - Disable the "Push message sent" message
dbr.push.log.proc - Log the push message activity to database
dbr.push.debug - Show status for each message sent

Syntax

select 'dbr.push';
select 'dbr.push.sender', 'pushover' | 'pushbullet' | 'prowl'
select 'dbr.push.option', 'option', 'value'
select 'dbr.push.notify_successful_push', 0
select 'dbr.push.log.proc', 'sp_log_stored_procedure'
select 'dbr.push.debug', 1

Options for Pushbullet:

access_token
If not provided in $mydbr_push
target
Target the message to specific device. Possible values 'device_iden', 'email', 'channel_tag', 'client_iden'. See Pushbullet documentation for details.

Options for Pushover:

token
If not provided in $mydbr_push
device
Your user's device name to send the message directly to that device, rather than all of the user's devices
url
A supplementary URL to show with your message
url_title
A title for the URL
priority
send as -2 to generate no notification/alert, -1 to always send as a quiet notification, 1 to display as high-priority and bypass the user's quiet hours, or 2 to also require confirmation from the user
timestamp
A Unix timestamp of your message's date and time to display to the user, rather than the time your message is received by our API
sound
The name of one of the sounds supported by device clients to override the user's default sound choice

Options for Prowl: providerkey', 'priority', 'application

providerkey
Your provider API key. Only necessary if you have been whitelisted
priority
-2: Very Low, -1: Moderate, 0: Normal, 1 High, 2 Emergency
application
The name of your application or the application generating the event

Usage

Send a notification when sender is defined

select 'dbr.push';

select 'John.Doe@gmail.com', 'Sales exceed $1M', 'Check the latest sales figures https://company.com/mydbr/report';

Define a sender and options

/* Send HTML mail */
select 'dbr.push';
select 'dbr.push.option', 'device', 'phone';
select 'dbr.push.option', 'sound', 'magic';
select 'dbr.push.log.proc', 'sp_mail_log';
select 'dbr.push.notify_successful_push', 0;
select 'dbr.push.sender', 'popover';

select 'us2e8xm87wiiba4s6vb3ik68pmqpfr', 'Title', 'Message body';