Sign in to follow this  
_nomad_

programming gprs in j2me

Recommended Posts

hi, sorry for the vague question....

i wanted to know how to make a PC / server communicate with a j2me device...i think i should use sockets? but midp 1.0 devices don't officially support sockets...but i have a phone that has an option that says gprs, so i'm thinking this could be a replacement for sockets? or is my understanding wrong?

sorry for the poor english.

thanks in advance for whoever will help. :)

Share this post


Link to post
Share on other sites
In J2ME the communication specifics are hidden away from the developer. You get a high level API, and the virtual machine takes care of all the details needed to make the connections (or to let you know that what you are trying isn't supported by throwing an exception).
Look at the javax.microedition.io.* package. There you can find all the classes you will need to perform the connection to servers. You're right about MIDP not having mandatory support for sockets. The only thing guaranteed to be supported is http. So you can start out by making HttpConnections. If the phone is a gprs phone then it will open those connections through gprs. Even though it isn't mandatory, many phones do support sockets. So it doesn't hurt to try opening a socket connection either.

shmoove

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this