Plugin Directory

Changeset 1599663


Ignore:
Timestamp:
02/20/2017 11:08:39 AM (9 years ago)
Author:
gtlwpdev
Message:

Split the mobile devices token in to chunks of 100 for sending messages in group.This will help when we have more number of users and we need to send pushntoification at once.Also set Maximum execution time.

Location:
all-push-notification/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • all-push-notification/trunk/pushnotification-admin/class-custom-pushnotification.php

    r1576513 r1599663  
    158158                           
    159159                            if($error == false) {
     160                                //$PushNotifications_obj=new PushNotifications();
     161                                //$PushNotifications_obj->send_notification($all_userDevices,$message);
     162                               
    160163                                $PushNotifications_obj=new PushNotifications();
    161                                 $PushNotifications_obj->send_notification($all_userDevices,$message);
     164                                $regIdChunk=array_chunk($all_userDevices,100);
     165                               
     166                                foreach($regIdChunk as $RegId){
     167                                   
     168                                     $PushNotifications_obj->send_notification($RegId,$message);
     169                                     
     170                                }
    162171                            }
    163172                        }
  • all-push-notification/trunk/pushnotification/class-pushnotification-android.php

    r1487061 r1599663  
    33   
    44    function sendToAndroid($registatoin_ids, $message) {
     5       
     6        ini_set('max_execution_time', 600); //600 seconds = 10 minutes
     7        ini_set("memory_limit","512M");
     8        set_time_limit(0);
     9           
    510        $error = false;
    611       
  • all-push-notification/trunk/pushnotification/class-pushnotification-ios.php

    r1487061 r1599663  
    11<?php   
    22class PushNotificationsIos {
     3   
    34    public static function sendToIOS($devices, $message) { 
     5       
     6        ini_set('max_execution_time', 600); //600 seconds = 10 minutes
     7        ini_set("memory_limit","512M");
     8        set_time_limit(0);
    49       
    510        $upload_dir = wp_upload_dir();
  • all-push-notification/trunk/pushnotification/class-pushnotification.php

    r1501046 r1599663  
    77        function send_notification($userDevices, $message) {
    88           
    9             ini_set("memory_limit","256M");
     9            ini_set('max_execution_time', 600); //600 seconds = 10 minutes
     10            ini_set("memory_limit","512M");
    1011            set_time_limit(0);
    1112       
  • all-push-notification/trunk/readme.txt

    r1576513 r1599663  
    44Requires at least: 4.4
    55Tested up to: 4.7
    6 Stable tag: 1.5.2
     6Stable tag: 1.5.3
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    116116
    117117== Changelog ==
     118
     119= 1.5.3 =
     120* Split the mobile devices token in to chunks of 100 for sending messages in group.This will help when we have more number of users and we need to send pushntoification at once.Also set Maximum execution time.
    118121
    119122= 1.5.2 =
     
    198201== Upgrade Notice ==
    199202
     203= 1.5.3 =
     204* Split the mobile devices token in to chunks of 100 for sending messages in group.This will help when we have more number of users and we need to send pushntoification at once.Also set Maximum execution time.
     205
    200206= 1.5.2 =
    201207* Description About The Custom Message Via Pushnotification
Note: See TracChangeset for help on using the changeset viewer.