• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Connector, setRequestProperty, MIDP 1.0  RSS feed

 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Im using this code for making a connection to the net. But my question is, whats is the "User-Agent"-key? And can I get that value (User-Agent)dynamicly?
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the user agent is the same as the host device(?), you can make a call to

I believe the other cross-platform calls are "microedition.encoding" for character encoding, "microedition.configuration" for the support CDC/CLCD and "microedition.profiles" for the supported MIDP. There may be others, but those are the ones I know of that are of use in getting information about the device the midlet is running on.
 
Sebastian Green
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I supose it works cause Im getting no errors and exceptions and Im having no problems to get the data. Instead of "User-Agent" "j2me" when I use WTK 1.0.4 Thanks but Im not shure what setRequestProperty(), Im using it two times, wouldnt that mean that the "User-Agent" would be overwritten when I use it the seconds time?
 
Sebastian Green
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It wont be overwritten because I name two diffrent keys. On ther other hand if the key was the same it would be assigned a new value. Right?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!