I need to send the push notification to android device, using GCM server library as done here for android devices: Link
Here is my code :
Sender sender = new Sender(SERVER_KEY);
Message message = new Message.Builder().timeToLive(30)
.delayWhileIdle(true).addData("messageKey", "abc")
.build();
result = sender.send(message, regId, 1);
I get the error below while executing the the last line of my code.
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed:sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Could anyone suggest me something on how to resolve this issue?