• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

J2ME Client

I would like to write IRC client for Nokia 7650.

I already made IRC client for windows.

Now all i want to know is how to connect to
one host, send data to that host and how to read
answer from host.

Example:
- i want to connect to host "irc.something.com:6667"
- i want to send some data to that host
- i want to recive answer
Could you tell me how, please?

Thank you for your answers...
0
ezicoder
Asked:
ezicoder
  • 5
  • 3
1 Solution
 
TimYatesCommented:
From http://www.forum.nokia.com/main/1,35452,1_0_20,00.html

Q25. Can I use sockets in my application in Nokia devices?
Not at the moment. Nokia's current MIDP implementations are based on MIDP 1.0 specification, which does not support Sockets. The only supported connection type is HTTP. Support for a lower-level network API such as Socket is under consideration for a later version of the MIDP specification, perhaps in MIDP 2.0.
0
 
girionisCommented:
> - i want to connect to host "irc.something.com:6667"

  You have to use: Connector.open("socket://irc.something.com:6667");

> - i want to send some data to that host
> - i want to recive answer

  You have to use OutputStream/DataOutputStream and InputStream/DataInputStream to do it.

  You can find some nice tutorials here:

http://www.informit.com/isapi/product_id~%7B4CDB188A-006B-4C93-8695-577753CA5993%7D/element_id~%7BAACD7327-4988-496D-9829-B2C17C00EA79%7D/st~%7B8D7D66D7-6E9F-475E-905C-4AA4EBC5CADC%7D/content/articlex.asp
http://www.wirelessdevnet.com/channels/java/features/j2me_http.phtml
http://www-106.ibm.com/developerworks/wireless/library/wi-jio/


  amd for more information on J2ME applications look here:

http://www-106.ibm.com/search/searchResults.jsp?searchType=1&searchSite=dW&query=j2me+network&searchScope=dW
0
 
TimYatesCommented:
So is the Nokia FAQ wrong?

I hate their site :-(
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
TimYatesCommented:
Errr...

4. What kind of Java implementations do Nokia phones support?

Nokia Java phones launched in CeBit/CTIA, and also the Nokia 7650 imaging phone that was launched earlier, support J2ME. Nokia's J2ME implementation consists of the industry standard MIDP 1.0 and CLDC 1.0. The platform is extended by the Nokia User Interface (UI) API. It gives application developers access to certain basic phone functionality that is not specified by CLDC 1.0 or MIDP 1.0. The Nokia UI API provides access to simple audio capabilities, vibration, display lighting, as well as some graphics-related enhancements. The functionality now included in Nokia UI API is currently being specified in the MIDP 2.0 expert group. Nokia's plan is to converge with the MIDP 2.0 specification when it is finalized.

And the javax.microedition.io package is part of MIDP 2.0
0
 
TimYatesCommented:
So I guess it all depends on whether you can get your 7650 upgraded to MIDP 2.0...
0
 
girionisCommented:
 Hmm.. not sure, I only used Motorola ones with J2ME. Tbh I did not pay attention to the Nokia 7650 statement by  ezicoder so I could be wrong. Maybe ezicoder can give us some more input on the phone and profile he is using?
0
 
ezicoderAuthor Commented:
Thank you very much!

Regards, ToMaS
0
 
girionisCommented:
 Thank you for the points. I am glad I helped :-)
0
 
TimYatesCommented:
Bah...bet it doesn't work on his Nokia 7650 ;-P
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now