Hi Varsha, There is one way of doing this. Add a functionality to your MIdlet to perform a HTTP Request to the server(HTTP Get or POST). HTTP Header - User Agent Field will contain the Model and Make of the Device.This can be trapped by the receiver servlet / JSP. If the device supports UAProf then it will contain other capabilities information also. Rgds Muthu
You should be able to find out the device type by calling in your MIDlet. Most devices will return a String describing the device (e.g. my Nokia 7210 returns "Nokia7210/4.20"). Unfortunately, not all devices implement this properly - some just return null, others just return "j2me". I don't know about Palm or Blackberry.
Originally posted by David Price: You should be able to find out the device type by calling in your MIDlet. Most devices will return a String describing the device (e.g. my Nokia 7210 returns "Nokia7210/4.20"). Unfortunately, not all devices implement this properly - some just return null, others just return "j2me". I don't know about Palm or Blackberry.
David what devices don't implement this? I though all MIDP1.0 compliant devices had to implement this ?
Motorola and Sony Ericsson phones return null for microedition.platform. Sanyo, Samsung, LG, and MIDP4Palm all return "j2me". Most phones do not set a User-Agent header with MIDP HttpConnections, so you can't rely on that either. When I've needed to identify the device, I've used a combination of microedition.platform, the canvas size, and the number of display colours. Unfortunately, it involves some guesswork and isn't very robust, but I've found it satisfactory for my needs.
Hello all, thanks for your replies.. Finally I did something like this, which returns true on plam and false on blackberry .. boolean bIsPalm; Class.forName("com.sun.midp.palm.Info"); bIsPalm = true; Thanks, varsha
These are the worst of times and these are the best of times. And this is the best tiny ad:
a bit of art, as a gift, that will fit in a stocking