×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    12

    Getting user agent string using MIDP

    Hi,
    Is there an API in MIDP for getting the user agent string?

    Thanks

    Yair

  2. #2
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: Getting user agent string using MIDP

    Hi Yair,

    I could not realize what you're talking about...MIDP clients generally represent the User-Agent when talking about HTTP. I mean, the API you're looking for would be the interest of a server side application...

    If you're talking about HTTP, you can set the regular User-Agent request header as per the HTTP 1.1 spec (as defined in RFC 2616). Then, if you're coding Java Servlets, you can use the method getHeader(String name) of HttpServletRequest to retrieve this information.

    It would help to set this header in your MIDlet, using the method setRequestProperty(String key, String value) of HttpConnection interface.

    At last, i was not sure if you were talking about User Agent related to SIP or HTTP. This is HTTP...

    Hope it helps!

    BR,

    Juarez Jr

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    12

    Re: Getting user agent string using MIDP

    Thanks for trying to asssit.
    By "user agent string" i mean the string that identifies the cellular device in a unique way (provides information on the model, and sometimes on the cellular operator as well)

  4. #4
    Super Contributor
    Join Date
    Mar 2006
    Posts
    516

    Re: Getting user agent string using MIDP

    Hi,

    U can use different values for System.getProperty()
    say "microedition.platform" gives the Nokia MODEL_NUMBER & SW_VERSION.

    "com.nokia.mid.imei" gives the imei number of the phone.

    The detailed list of strings used for System.getProperty() and its description is defined in

    http://www.forum.nokia.com/info/sw.n..._2_en.zip.html

    Wang

Similar Threads

  1. a question about the user agent string
    By jackchang1@gmail.com in forum Mobile Java General
    Replies: 3
    Last Post: 2005-09-19, 12:06
  2. Series 60 Concept Emulator (SDK Beta 0.2 Linux) not working
    By mattbee in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2003-06-10, 11:43
  3. Series 60Series 60 MIDP Concept SDK Beta 0.2 Linux bug?
    By kauppi in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2003-04-07, 09:05
  4. Http connection problem in 6310i
    By teahola in forum Mobile Java General
    Replies: 1
    Last Post: 2002-10-03, 18:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×