×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    9

    Getting user agent string...

    how to get the user agent string from nokia cell phones in J2ME..

  2. #2
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,430

    Re: Getting user agent string...

    Hi shiva.n! Welcoem to Forum Nokia Discussion Boards!!

    Please have a look at the URL User Agent Headers for Nokia Devices

    Regards
    Gopal

  3. #3
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Getting user agent string...

    Welcome to Forum Nokia!!

    The user-agent string is part of an HTTP request. You can get it only from an HTTP server, by reading the request. There is no way to get the device's user-agent string from on the device.

    What problem are you trying to solve? Perhaps there is another solution?

    Graham.

  4. #4
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,430

    Re: Getting user agent string...

    Oops ! I guess I missed that the question was about getting the user agent string in Java ME. And my previous URL would not help in that case to retrieve in Java ME.

    Regards
    Gopal

  5. #5
    Registered User
    Join Date
    Jul 2010
    Posts
    9

    Re: Getting user agent string...

    @Gopal
    @Graham

    thanks for your reply,

    the problem is some how i want fetch user agent. .... is it possible to get looping back to my cell phone like localhost in computers... please help me out...

    and do you people have any idea how to remove UNTRUSTED security warning in j2me application.. because i am getting this error when i tried to install my application in cell phone....


    thanking you

    Shiva.
    Last edited by shiva.n; 2010-07-14 at 11:31.

  6. #6
    Registered User
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868

    Re: Getting user agent string...

    Hi Shiva,

    Adding it to Grahamhughes and bala, You can form the user agent not the exact user agent , but user agent kind of a string in the J2me App it self ,

    user agent is a combination of your manufacturer + model + profile + configuration etc..

    You can get the manufacture and model using the System.getProperty ("microedition.platform")

    And microedition profile by using System.getProperty ("microedition.profiles") and System.getProperty ("microedition.configuration"); Combine these parameters and you can form user agent like a string in j2me App it self .


    Regarding the UNTRUSTED security warning in j2me You need to sign your application For signing please refer forum nokia wiki .

    Hope it will heps you

  7. #7
    Registered User
    Join Date
    Jul 2010
    Posts
    9

    Re: Getting user agent string...

    @Bhanu Chandar

    but i can fetch exact user agent string in SAMSUNG mobile... by using system.getProperty("User-Agent") .... why not in NOKIA...???

    and the problem is ... the applications which have UNTRUSTED security warning problem they are not giving up their user agent string in HTTP HEADER its coming like UNTRUSED/1.0 ... how can i solve this problem...

    thank you,

    Shiva.
    Last edited by shiva.n; 2010-07-14 at 13:07.

  8. #8
    Registered User
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868

    Re: Getting user agent string...

    Hi Shiva,

    The samsung has defined their own i.e samsung specific system property , But Nokia does't have such a system property.

    These are the system properties of j2me

    http://developers.sun.com/mobility/m...ies/index.html
    http://wiki.forum.nokia.com/index.ph...tem_properties

    In case of untrusted thing in the user agent If you sing your app It will goes off .

  9. #9
    Registered User
    Join Date
    Jul 2010
    Posts
    9

    Re: Getting user agent string...

    Is there any alternate way to send user agent ....

  10. #10
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Getting user agent string...

    pigeons ?
    seriously, afaik there is no other way
    Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.

  11. #11
    Registered User
    Join Date
    Jul 2010
    Posts
    9

    Re: Getting user agent string...

    Ok...

    Is there any way to get the properties of the browser of that cell phone.. means getting the user agent from that browser...

  12. #12
    Registered User
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868

    Re: Getting user agent string...

    Hi,
    In the below post I have mentioned right what are the system properties are available please check those. You can't get the browser properties.

  13. #13
    Registered User
    Join Date
    Jul 2010
    Posts
    9

    Re: Getting user agent string...

    I read up and figured that UA is a native browser level parameter. Can anyone give me pointers to talk to the native browser (within my app) and fetch the UA from the browsers? I just want to explore all possible ways before "building" a UA string using system properties

  14. #14
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,430

    Re: Getting user agent string...

    I doubt its possible to get info back from browser from a Java app.

    Regards
    Gopal

  15. #15
    Registered User
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868

    Re: Getting user agent string...

    Hi shiva,

    As bala said it is not possible to get the UA string from the app, and there is no system property as well , The only way is to get the http request header only.

    Here is one more useful link which will provides the mobile device capabilities etc...

    http://wiki.forum.nokia.com/index.ph...the_mobile_web

Page 1 of 2 12 LastLast

Similar Threads

  1. User Agent String
    By mind_freak in forum Qt
    Replies: 2
    Last Post: 2010-04-06, 17:33
  2. User Agent String
    By shankx in forum Symbian Web Runtime
    Replies: 1
    Last Post: 2009-05-25, 08:31
  3. Getting user agent string using MIDP
    By yair.zaslavsky in forum Mobile Java General
    Replies: 3
    Last Post: 2006-05-10, 20:14
  4. 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
  5. User Agent
    By achan in forum General Messaging
    Replies: 1
    Last Post: 2003-04-09, 16:52

Posting Permissions

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