Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Basic Technical Network Question

 
Sebastian Green
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I working with and testing diffrent kinds of way to get information from a server to my midlet. Im using WTK and when my midlets want to reach the server it uses my Workstations connection. But how dose it work if the midlet was executed on a real cellphone. Which techniques are aviable for cellphoneuser to get info from a server using a wireless-techniques?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MIDP 1.0 phones provide HTTP networking, MIDP 2.0 adds HTTPS, socket (TCP), UDP, and serial port connections. Then there's Bluetooth and IrDA.
(others, please correct me if I remembered something wrong)
 
Jason Fox
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The syntax is something like:

Then you can link the appropriate data streams, etc to read and write from the connection.
note: HttpsConnection (and other connect types) are only supported under midp 2.0, use HttpConnection if you are developing to a midp 1.0 phone, and don't forget the java.microedition.io.*; and the java.io.*; (for IOException, so you can catch the correct exception if there's a problem) packages.
Jason
[ March 24, 2004: Message edited by: Jason Fox ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic