account_tab_key); if(isset($_POST['selfpushoptions']) && !empty($_POST['selfpushoptions'])){ $postid = $_POST['selfpushoptions']; if(isset($_POST['immediate']) && $_POST['immediate'] == '1'){ echo "Push notification Logs"; echo "
";
			require_once PW_MOBILE_PATH.'gcm/send_message.php';
			sendPushNotification(array("post_id" => $postid, "title" => "New Post $postid", "notification_type" => "stack"), $accountOptions[ANDROAPP_GCM_API_KEY]);
			echo "
"; }else{ $this->schedule_push_notification($postid, "New post $postid", $accountOptions[ANDROAPP_GCM_API_KEY]); $this->show_success_message("Scheduled Push Notification"); } } ?> Please ensure that you fill google api key and sender id in account settings tab and create a new apk, install that apk in your mobile.

SelfPush

trigger push notification for a post
Enter Post Id: (please enter correct post id)

Send Immediate:
By default notification is scheduled to go after 10 minutes, check this box to send push notification immediately, this might take some time depending on number of users and will show logs on this screen, your server might kill this request in middle depending on your server configuration, so we recommend not to select this option in general.

Push notification Statistics

prefix . 'androapp_stats'; $time = "7days"; if(isset($_GET['time'])){ $time = $_GET['time']; } $date = date('Y-m-d', strtotime('-6 days')); $date .= " 00:00:00"; $todate = null; $last7days = "Last 7 Days"; $thismonth = "This Month"; $lastmonth = "Last Month"; $alltime = "All Time"; if(empty($time) || $time == "7days"){ $last7days = "Last 7 Days"; } if($time == "currentmonth"){ $m = date('m'); $y = date('Y'); $date = $y."-".$m."-01 00:00:00"; $thismonth = "This Month"; }else if($time == 'lastmonth'){ $m = date('m'); $y = date('Y'); $todate = $y."-".$m."-01 00:00:00"; $m = intval($m) - 1; if($m == 0){ $m = 12; } if($m < 10){ $m = "0".strval($m); }else{ $m = strval($m); } $date = $y."-".$m."-01 00:00:00"; $lastmonth = "Last Month"; }else if($time == 'alltime'){ $date = null; $alltime = "All Time"; } $query = "SELECT * FROM $stats_table"; if(!empty($date)){ $query .= " where created_at > '$date'"; } if(!empty($todate)){ $query.= " and created_at < '$todate'"; } //echo "Query ".$query; $result = $wpdb->get_results($query); //echo "
"; print_r($result); echo "
"; echo $last7days . $thismonth . $lastmonth.$alltime; if(empty($result)){ echo "

No Records found for the duration "; }else{ ?> "; } ?>
Notification TitleTrigger TimeAttemptedSentUninstalledSenderId MisMatchOther ErrorsStatus
$row->title$row->created_at$row->eligible$row->success$row->notRegistered$row->mismatchsenderid$row->other$row->status