• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

User-Agent is not being send + midlet

 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am trying to use asp.net to grab the user-Agent then display it on the a phone.

However I noticed when the midlet connection to my asp.net website application no user-agent is sent and I don't understand why.

Here is my code:



Here is my midlet code:



When I check the debugger of my asp.net app only 2 header fields get sent to it.

1.context-length
2. host

That's it nothing else. I am not sure what I am missing.
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
User agents are not required at a protocol level and, unlike microbrowsers are not default when using the low level API.

You can set the user agent header by using:

c.setRequestProperty("User-Agent","myUserAgentString");

Some suggest using a User Agent based off the platform:

System.getProperty("microedition.platform");

We usually create a user agent which includes the application name and version.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic