如何在通过 HttpConnection 发送数据之前检查 GPRS 可用性

发布于 2024-12-17 20:31:18 字数 363 浏览 7 评论 0原文

我正在制作一个 Java ME 应用程序。在这里,我使用 HttpConnection 与 Web 服务建立 Connection 。我使用 HttpConnectionDataInputStream 发送/接收数据数据输出流。但我的问题是如何检查当前 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡淡の花香 2024-12-24 20:31:18

基于 本文,您可以使用以下属性来获取所使用的活动连接的网络访问类型或设置的默认访问点。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文