开发者

javax.net.ssl.SSLHandshakeException: Could not verify SSL certificate for: https://android.apis.google.com/c2dm/send

I am getting [C2DMReg] handleRequest caught

org.apache.http.auth.AuthenticationException

while trying to get the registration id from google server. Here is the logcat trace:

02-2开发者_运维百科4 19:10:26.951: WARN/DefaultRequestDirector(122): Authentication error: Unable to respond to any of these challenges: {}
02-24 19:10:26.969: DEBUG/C2DMRegistrar(122): [C2DMRegistrar.24] register: http error 401
02-24 19:10:26.969: ERROR/C2DMRegistrar(122): [C2DMReg] handleRequest caught org.apache.http.auth.AuthenticationException

But I am able to get the registration id.But when I try to send the msg to device, I get an exception that is

javax.net.ssl.SSLHandshakeException: Could not verify SSL certificate for: https://android.apis.google.com/c2dm/send

What can be the reason ? Its been 24 hours I registered my email id for C2DM service. I got their mail.But still it does not work.


It seem that Android device c2dm accepts only *.apis.google.com certificates. Try setting a fake HostnameVerifier as described here:

http://groups.google.com/group/android-c2dm/browse_thread/thread/49e902657d76a530

Update:

There is a project called ChromeToPhone which sends URLs from browser plugin to AppEngine backend and then via C2DM to Android phone.

Probably it would help to look at their source to see how they implemented C2DM on AppEngine: http://code.google.com/p/chrometophone/source/browse/#svn%2Ftrunk%2Fappengine

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜