views:

119

answers:

3

I am developing a j2me map based application. Screen is divided into a grid of images and I have to request these images from a server. This can be threaded. What is the maximum no of threads that I can spawn in a j2me midlet? Is there a way to arrive at this no?

A: 

Hi,

have a look on this http://developers.sun.com/mobility/midp/articles/threading2/

4NDR01D3
+1  A: 

It purely depends on the device. Some devices have more numbers of threads, some less. Typically most phones would support from 5 to 10 threads, but these numbers may vary. A word of caution is that the more the number of threads, the less the application responsiveness is

Ram
+1  A: 

If your are talking about max. number of simultaneously requests to server, most device would allow only one. And, I think, that if some devices would allow to create several connections in a time, on hardware level they would make only one, so you'd better

  • open connection
  • wait for response
  • read data
  • close connection
  • open another connection
  • ...

I know that Google map for j2me uses sockets, which heavily improve download speed.

Also, try looking at nutiteq and j2memap

Pavel Alexeev