0
如何糾正錯誤「方法getErrorCodeName()未定義爲類型MulticastResult」?我用下面的代碼使用GCM的android代碼中的getErrorCodeName()錯誤
MulticastResult result = sender.send(message, androidTargets, 1);
if (result.getResults() != null) {
int canonicalRegId = result.getCanonicalIds();
if (canonicalRegId != 0) {
// same device has more than on registration ID: update database
}
} else {
int error = result.getFailure();
System.out.println("Broadcast failure: " + error);
String error_code_name = result.getErrorCodeName(); //Error is Here
if (error_code_name.equals(Constants.ERROR_NOT_REGISTERED)) {
// application has been removed from device - unregister database or remove from database
}
}
在此先感謝!
太謝謝你了。它的工作 – Sakthimuthiah 2013-05-06 04:21:16