google cloud messaging - GCM Success then NotRegistered -


i'm trying send push app , testing using website : http://www.pushwatch.com/gcm/

first try receive success message , error message : notregistered.

same result code :

<html> <form method="post" action="test.php">     id : <input type="text" name="id"/><br/>     message : <input type="text" name="message"/><br/>     <input type="submit" value="envoyer"/> </form> 

if (isset($_post["message"])) {     $message = $_post["message"];     $registrationids = $_post["id"];     echo "call<br/>";     echo "message = ".$message." / ids = ".$registrationids."<br/><br/>";      // api access key google api's console     define( 'api_access_key', 'aiza....' );     // prep bundle     $msg = array             (              'message'      => $message,              'title'        => 'this title. title',              'subtitle'     => 'this subtitle. subtitle',              'tickertext'   => 'ticker text here...ticker text here...ticker text here',              'vibrate'      => 1,              'sound'        => 1,              'largeicon'    => 'large_icon',              'smallicon'    => 'small_icon'             );     $fields = array             (              'to'   => $registrationids,              'data'                 => $msg             );      $headers = array             (              'authorization: key=' . api_access_key,              'content-type: application/json'             );      $ch = curl_init();     curl_setopt( $ch,curlopt_url, 'https://gcm-http.googleapis.com/gcm/send' );     curl_setopt( $ch,curlopt_post, true );     curl_setopt( $ch,curlopt_httpheader, $headers );     curl_setopt( $ch,curlopt_returntransfer, true );     curl_setopt( $ch,curlopt_ssl_verifypeer, false );     curl_setopt( $ch,curlopt_postfields, json_encode( $fields ) );     $result = curl_exec($ch );     curl_close( $ch );      echo "result<br/>";     echo $result; 

}

try following workarounds based forum:

  • make sure apns token you're using register gcm valid particular server.
  • make sure using right ios development provisioning profile.
  • check if you're using specific profile bundle name instead of a generic one.
  • to push , background notifications working again:
    • remove/uninstall application test device.
    • perform 'clean' in xcode.
    • perform 'build' in xcode.
    • reinstall app device.

check these related questions:


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -