diff --git a/push_notifications.api.php b/push_notifications.api.php
index 1cd6db4..f85b05a 100644
--- a/push_notifications.api.php
+++ b/push_notifications.api.php
@@ -33,8 +33,10 @@ function hook_push_notifications_store_token(&$token, $type_id, $uid) {
  *
  * @param string $token
  *   Token being purged.
+ * @param int $type_id
+ *   Device type id.
  *
  */
-function hook_push_notifications_purge_token($token) {
+function hook_push_notifications_purge_token($token, $type_id) {
 
 }
diff --git a/push_notifications.module b/push_notifications.module
index 3200b6e..71f5dc1 100644
--- a/push_notifications.module
+++ b/push_notifications.module
@@ -308,6 +308,17 @@ function push_notifications_store_token($token = '', $type_id = '', $uid = '', $
     $function($token, $type_id, $uid);
   }
 
+  // Invoke rules.
+  if (module_exists('rules')) {
+    rules_invoke_event_by_args('push_notifications_before_token_insert', array(
+        'token' => $token,
+        'type_id' => $type_id,
+        'uid' => $uid,
+        'language' => $language,
+      )
+    );
+  }
+
   if (!is_string($token) || !is_numeric($type_id) || !is_numeric($uid)) {
     return FALSE;
   }
@@ -326,7 +337,21 @@ function push_notifications_store_token($token = '', $type_id = '', $uid = '', $
   $record->type = $type_id;
   $record->language = $language;
   $record->timestamp = time();
-  return drupal_write_record($table, $record);
+  $result = drupal_write_record($table, $record);
+
+  // Invoke rules.
+  if (module_exists('rules')) {
+    rules_invoke_event_by_args('push_notifications_after_token_insert', array(
+        'token' => $token,
+        'type_id' => $type_id,
+        'uid' => $uid,
+        'language' => $language,
+        'result' => $result,
+      )
+    );
+  }
+
+  return $result;
 }
 
 
@@ -564,6 +589,20 @@ function push_notifications_apns_send_message($tokens, $payload) {
 
   $result['message'] = t('Successfully sent !count_success iOS push messages (attempted to send !count messages).', array('!count_success' => $result['count_success'], '!count' => $result['count_attempted']));
   $result['success'] = TRUE;
+
+  // Invoke rules.
+  if (module_exists('rules')) {
+    rules_invoke_event_by_args('push_notifications_after_apns_send', array(
+        'type_id' => PUSH_NOTIFICATIONS_TYPE_ID_IOS,
+        'payload' => $payload,
+        'count_attempted' => $result['count_attempted'],
+        'count_success' => $result['count_success'],
+        'success' => $result['success'],
+        'result_message' => $result['message'],
+      )
+    );
+  }
+
   return $result;
 }
 
@@ -681,7 +720,7 @@ function push_notifications_c2dm_send_message($tokens, $payload) {
       // If the device token is invalid or not registered (anymore because the user
       // has uninstalled the application), remove this device token.
       if (preg_match('/InvalidRegistration/', $response) || preg_match('/NotRegistered/', $response)) {
-        push_notifications_purge_token($token);
+        push_notifications_purge_token($token, PUSH_NOTIFICATIONS_TYPE_ID_ANDROID);
         watchdog('daddyhunt_apns', 'C2DM token not valid anymore. Removing token ' . $token);
       }
     }
@@ -695,6 +734,21 @@ function push_notifications_c2dm_send_message($tokens, $payload) {
 
   $result['message'] = t('Successfully sent !count_success Android push messages (attempted to send !count messages).', array('!count_success' => $result['count_success'], '!count' => $result['count_attempted']));
   $result['success'] = TRUE;
+
+  // Invoke rules.
+  if (module_exists('rules')) {
+    rules_invoke_event_by_args('push_notifications_after_c2dm_send', array(
+        'type_id' => PUSH_NOTIFICATIONS_TYPE_ID_ANDROID,
+        'payload' => $payload,
+        'count_attempted' => $result['count_attempted'],
+        'count_success' => $result['count_success'],
+        'success' => $result['success'],
+        'result_message' => $result['message'],
+      )
+    );
+  }
+
+
   return $result;
 }
 
@@ -783,7 +837,7 @@ function push_notifications_gcm_send_message($tokens, $payload) {
           // If the device token is invalid or not registered (anymore because the user
           // has uninstalled the application), remove this device token.
           if ($message_result->error == 'NotRegistered' || $message_result->error == 'InvalidRegistration') {
-            push_notifications_purge_token($bundle_tokens[$token_index]);
+            push_notifications_purge_token($bundle_tokens[$token_index], PUSH_NOTIFICATIONS_TYPE_ID_ANDROID);
             watchdog('push_notifications', 'GCM token not valid anymore. Removing token ' . $bundle_tokens[$token_index]);
           }
         }
@@ -798,6 +852,20 @@ function push_notifications_gcm_send_message($tokens, $payload) {
 
   $result['message'] = t('Successfully sent !count_success Android push messages (attempted to send !count messages).', array('!count_success' => $result['count_success'], '!count' => $result['count_attempted']));
   $result['success'] = TRUE;
+
+  // Invoke rules.
+  if (module_exists('rules')) {
+    rules_invoke_event_by_args('push_notifications_after_gcm_send', array(
+        'type_id' => PUSH_NOTIFICATIONS_TYPE_ID_ANDROID,
+        'payload' => $payload,
+        'count_attempted' => $result['count_attempted'],
+        'count_success' => $result['count_success'],
+        'success' => $result['success'],
+        'result_message' => $result['message'],
+      )
+    );
+  }
+
   return $result;
 }
 
@@ -919,18 +987,43 @@ function push_notifications_used_languages() {
  * Delete a token.
  *
  * @param $token
+ *   Device token.
+ *
+ * @param $type_id
+ *   Device Type ID.
+ *
  */
-function push_notifications_purge_token($token = '') {
+function push_notifications_purge_token($token = '', $type_id = '') {
   if ($token == '' || !is_string($token)) {
     return FALSE;
   }
 
   // Allows other modules to respond to a token being purged.
-  module_invoke_all('push_notifications_purge_token', $token);
+  module_invoke_all('push_notifications_purge_token', $token, $type_id);
+
+  // Invoke rules.
+  if (module_exists('rules')) {
+    rules_invoke_event_by_args('push_notifications_before_token_delete', array(
+        'token' => $token,
+        'type_id' => $type_id,
+      )
+    );
+  }
 
   $query = db_delete('push_notifications_tokens');
   $query->condition('token', $token);
-  return $query->execute();
+  $result = $query->execute();
+
+  // Invoke rules.
+  if (module_exists('rules')) {
+    rules_invoke_event_by_args('push_notifications_after_token_delete', array(
+        'token' => $token,
+        'type_id' => $type_id,
+      )
+    );
+  }
+
+  return $result;
 }
 
 
@@ -979,10 +1072,18 @@ function push_notifications_apns_feedback_service() {
   // Remove all tokens that are not valid anymore.
   $counter = 0;
   foreach ($tokens as $token) {
-    push_notifications_purge_token($token['devtoken']);
+    push_notifications_purge_token($token['devtoken'], PUSH_NOTIFICATIONS_TYPE_ID_IOS);
     $counter++;
   }
 
+  // Invoke rules.
+  if (module_exists('rules')) {
+    rules_invoke_event_by_args('push_notifications_after_apns_feedback', array(
+        'counter' => $counter,
+      )
+    );
+  }
+
   // Give some feedback after the process finished.
   watchdog('push_notifications', '!count were removed after pulling the Apple feedback service.', array('!count' => $counter));
 
diff --git a/push_notifications.rules.inc b/push_notifications.rules.inc
new file mode 100644
index 0000000..5b4290d
--- /dev/null
+++ b/push_notifications.rules.inc
@@ -0,0 +1,137 @@
+<?php
+/**
+ * @file
+ * Administration Events Rule for Push Notifications.
+ */
+
+
+/**
+ * Implements hook_rules_action_info().
+ */
+function push_notifications_rules_action_info() {
+  $items = array(
+    'push_notifications_send_message' => array(
+      'label' => t('Send a push notification'),
+      'group' => t('Push notification'),
+      'parameter' => array(
+        'uids' => array(
+          'type' => 'list<integer>',
+          'label' => t('Array of uids'),
+        ),
+        'payload' => array(
+          'type' => 'text',
+          'label' => t('Notification payload'),
+        ),
+      ),
+    ),
+  );
+  return $items;
+}
+
+
+
+/**
+ * Implements hook_rules_event_info().
+ */
+function push_notifications_rules_event_info(){
+  $events = array();
+
+  $events['push_notifications_before_token_insert'] = array (
+    'label' => t('Before saving a new device token'),
+    'group' => t('Push Notifications'),
+    'module' => 'push_notifications',
+    'variables' => array(
+      'token' => array('type' => 'text', 'label' => t('token to be inserted')),
+      'type_id' => array('type' => 'integer', 'label' => t('type of device: 0 iOS, 1 Android')),
+      'uid' => array('type' => 'integer', 'label' => t('User id')),
+      'language' => array('type' => 'text', 'label' => t('Language')),
+    ),
+  );
+
+  $events['push_notifications_after_token_insert'] = array (
+    'label' => t('After saving a new device token'),
+    'group' => t('Push Notifications'),
+    'module' => 'push_notifications',
+    'variables' => array(
+      'token' => array('type' => 'text', 'label' => t('token to be inserted')),
+      'type_id' => array('type' => 'integer', 'label' => t('type of device: 0 iOS, 1 Android')),
+      'uid' => array('type' => 'integer', 'label' => t('User id')),
+      'language' => array('type' => 'text', 'label' => t('Language')),
+      'result' => array('type' => 'integer', 'label' => t('Return value: FALSE for error, SAVED_NEW if succeded')),
+    ),
+  );
+
+  $events['push_notifications_before_token_delete'] = array (
+    'label' => t('Before deleting a device token'),
+    'group' => t('Push Notifications'),
+    'module' => 'push_notifications',
+    'variables' => array(
+      'token' => array('type' => 'text', 'label' => t('token to be inserted')),
+      'type_id' => array('type' => 'integer', 'label' => t('type of device: 0 iOS, 1 Android')),
+    ),
+  );
+
+  $events['push_notifications_after_token_delete'] = array (
+    'label' => t('After deleting a device token'),
+    'group' => t('Push Notifications'),
+    'module' => 'push_notifications',
+    'variables' => array(
+      'token' => array('type' => 'text', 'label' => t('token to be inserted')),
+      'type_id' => array('type' => 'integer', 'label' => t('type of device: 0 iOS, 1 Android')),
+    ),
+  );
+
+  $events['push_notifications_after_apns_feedback'] = array (
+    'label' => t('iOS feedback service was completed'),
+    'group' => t('Push Notifications'),
+    'module' => 'push_notifications',
+    'variables' => array(
+      'counter' => array('type' => 'integer', 'label' => t('Number of tokens removed')),
+    ),
+  );
+
+
+  $events['push_notifications_after_apns_send'] = array (
+    'label' => t('After sending an iOS push notification (APNS)'),
+    'group' => t('Push Notifications'),
+    'module' => 'push_notifications',
+    'variables' => array(
+      'type_id' => array('type' => 'integer', 'label' => t('type of device: 0 iOS, 1 Android')),
+      'payload' => array('type' => 'payload', 'text' => t('Payload sent')),
+      'count_attempted' => array('type' => 'integer', 'label' => t('Attempted to send')),
+      'count_success' => array('type' => 'integer', 'label' => t('Successfully sent')),
+      'success' => array('type' => 'integer', 'label' => t('Result of the sent')),
+      'result_message' => array('type' => 'text', 'label' => t('Prepared result message')),
+    ),
+  );
+
+  $events['push_notifications_after_c2dm_send'] = array (
+    'label' => t('After sending an Android push notification (C2DM)'),
+    'group' => t('Push Notifications'),
+    'module' => 'push_notifications',
+    'variables' => array(
+      'type_id' => array('type' => 'integer', 'label' => t('type of device: 0 iOS, 1 Android')),
+      'payload' => array('type' => 'payload', 'text' => t('Payload sent')),
+      'count_attempted' => array('type' => 'integer', 'label' => t('Attempted to send')),
+      'count_success' => array('type' => 'integer', 'label' => t('Successfully sent')),
+      'success' => array('type' => 'integer', 'label' => t('Result of the sent')),
+      'result_message' => array('type' => 'text', 'label' => t('Prepared result message')),
+    ),
+  );
+
+  $events['push_notifications_after_gcm_send'] = array (
+    'label' => t('After sending an Android push notification (GCM)'),
+    'group' => t('Push Notifications'),
+    'module' => 'push_notifications',
+    'variables' => array(
+      'type_id' => array('type' => 'integer', 'label' => t('type of device: 0 iOS, 1 Android')),
+      'payload' => array('type' => 'payload', 'text' => t('Payload sent')),
+      'count_attempted' => array('type' => 'integer', 'label' => t('Attempted to send')),
+      'count_success' => array('type' => 'integer', 'label' => t('Successfully sent')),
+      'success' => array('type' => 'integer', 'label' => t('Result of the sent')),
+      'result_message' => array('type' => 'text', 'label' => t('Prepared result message')),
+    ),
+  );
+
+  return $events;
+}
