在我的应用程序中,我想在j2me(lwuit)中使用对话框检查gprsconnection可以有人有想法吗?
答案 0 :(得分:0)
只需尝试打开一个地址
private boolean isNetworkAvailable() {
boolean result = false;
HttpConnection httpConnection = null;
try {
httpConnection = (HttpConnection) Connector.open("http://www.google.com");
result = true;
} catch (Exception e) {
}
return result;
}