如何在通过 HttpConnection 发送数据之前检查 GPRS 可用性
我正在制作一个 Java ME 应用程序。在这里,我使用 HttpConnection
与 Web 服务建立 Connection
。我使用 HttpConnection
、DataInputStream
发送/接收数据数据输出流
。但我的问题是如何检查当前 GPRS 连接是否可用?
我得到了 System.getProperty("com.nokia.mid.networkavailability");
API 来检查网络的可用性。但我想知道如何检查GPRS是否可用?帮助我解决这个问题。 (我正在使用诺基亚的 E5 手机进行开发工作)。
I am making one Java ME Application. Here I am using HttpConnection
for making Connection
with webservices. I send/Receive data using HttpConnection
, DataInputStream
& DataOutputStream
. But My Problem is that How can I check that currently GPRS connection is available or not ?
I got, System.getProperty("com.nokia.mid.networkavailability");
API to check the Network's Availability. But I want to know how to check if GPRS is available or not ? Help Me Regarding this. ( I am using Nokia's E5 Phone for Development work ).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
基于 本文,您可以使用以下属性来获取所使用的活动连接的网络访问类型或设置的默认访问点。
String value = System.getProperty("com.nokia.network.access");
您也可以阅读这篇文章,Java™ ME 中的 IAP Info API。 它会对您有所帮助。
Based on this article, You can use the following property for getting the network access type of used active connection or a set default access point.
String value = System.getProperty("com.nokia.network.access");
Also you can read this article, IAP Info API in Java™ ME. It will helps you.