Search code examples
java-menokiamidpgprshttpconnection

How to check GPRS Availability before sending Data through HttpConnection


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 ).


Solution

  • 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.