|
@@ -84,6 +84,7 @@ class push_sender
|
|
|
$customizedcast->setPredefinedKeyValue("alias", $pushinfo['member_id']);
|
|
|
$customizedcast->setPredefinedKeyValue("alias_type", $this->ios_alias_type);
|
|
|
$customizedcast->setPredefinedKeyValue("alert", $pushinfo['text']);
|
|
|
+ $customizedcast->setPredefinedKeyValue("badge", 1);
|
|
|
$customizedcast->setPredefinedKeyValue("production_mode", "false");
|
|
|
$customizedcast->setCustomizedField("custom", json_encode($pushinfo['custom']));
|
|
|
|
|
@@ -121,17 +122,17 @@ class push_sender
|
|
|
|
|
|
public function send_message(array $info)
|
|
|
{
|
|
|
-// try
|
|
|
-// {
|
|
|
-// $ret = $this->sendAndroidCustomizedcastMessage($info);
|
|
|
-// $data = json_decode($ret,true);
|
|
|
-// if(strtoupper($data['ret']) == 'SUCCESS') {
|
|
|
-// return true;
|
|
|
-// }
|
|
|
-// }
|
|
|
-// catch (Exception $ex) {
|
|
|
-// Log::record("push_app sendAndroid error",Log::ERR);
|
|
|
-// }
|
|
|
+ try
|
|
|
+ {
|
|
|
+ $ret = $this->sendAndroidCustomizedcastMessage($info);
|
|
|
+ $data = json_decode($ret,true);
|
|
|
+ if(strtoupper($data['ret']) == 'SUCCESS') {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception $ex) {
|
|
|
+ Log::record("push_app sendAndroid error",Log::ERR);
|
|
|
+ }
|
|
|
|
|
|
try
|
|
|
{
|