When a 200 NotRegistered is sent back, the Sender.java code throws at line 222 when attempting to
parse the response. This is when attempting to send a notification using a notification key that no longer exists on the gcm side.
Error parsing JSON response (): Unexpected token END OF FILE at position 0.
at org.json.simple.parser.JSONParser.parse(Unknown Source) [json-simple-1.1.jar:]
at org.json.simple.parser.JSONParser.parse(Unknown Source) [json-simple-1.1.jar:]
at org.json.simple.parser.JSONParser.parse(Unknown Source) [json-simple-1.1.jar:]
at com.google.android.gcm.server.Sender.sendNoRetry(Sender.java:222) [gcm-server-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
at com.google.android.gcm.server.Sender.send(Sender.java:182) [gcm-server-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
java.io.IOException: Error parsing JSON response ():Unexpected token END OF FILE at position 0.
It would be nice to handle this case in the Sender code
so I can remove the notification key and associated tokens
from my db .
When a 200 NotRegistered is sent back, the Sender.java code throws at line 222 when attempting to parse the response. This is when attempting to send a notification using a notification key that no longer exists on the gcm side.
Error parsing JSON response (): Unexpected token END OF FILE at position 0. at org.json.simple.parser.JSONParser.parse(Unknown Source) [json-simple-1.1.jar:] at org.json.simple.parser.JSONParser.parse(Unknown Source) [json-simple-1.1.jar:] at org.json.simple.parser.JSONParser.parse(Unknown Source) [json-simple-1.1.jar:] at com.google.android.gcm.server.Sender.sendNoRetry(Sender.java:222) [gcm-server-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at com.google.android.gcm.server.Sender.send(Sender.java:182) [gcm-server-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
java.io.IOException: Error parsing JSON response ():Unexpected token END OF FILE at position 0.
It would be nice to handle this case in the Sender code so I can remove the notification key and associated tokens from my db .