This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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?
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!