on OwnerInfo

I need to retrieve the name of the owner of the device.

I find that I can use the OwnerInfo class.

But, according to the document, this class is available after jde 4.2.0.

If I need to use the JDE 4.1.0 how can I retrieve the name of the owner?

Thank you

Jerry

There is unfortunately no way to retrieve the name of the owner with 4.1.0 API.

Tags: BlackBerry Developers

Similar Questions

  • Read by program the device owner

    Hello friends,

    Can I get programmatically (Options-> owner) owner of a BlackBerry device?

    If so, please give me some advice...

    Thank you

    Tibi.

    I think I found class OwnerInfo

    http://www.BlackBerry.com/developers/docs/4.2.1API/NET/rim/device/API/system/OwnerInfo.html

    I have to test...

    Thanks anyway.

    Yes, it works.

    SOLVED

  • Help function LabelField

    Hello

    I use many LabelField controls in the project do not wish to repeat the same code & would like help in creating a reusable function.

    Example:

    Import net.rim.blackberry.api.phone.Phone;

    LabelField lfOwner = new LabelField ("owner:" + OwnerInfo.getOwnerName (), DrawStyle.LEFT)
    {
    public void paint (Graphics g)
    {
    g.setColor (Color.DARKGREEN);
    g.setBackgroundColor (Color.WHITE);
    Super.Paint (g);
    }
    };

    LabelField lfOwnerInfo = new LabelField ("owner:" + OwnerInfo.getOwnerInformation (), DrawStyle.LEFT)
    {
    public void paint (Graphics g)
    {
    g.setColor (Color.DARKGREEN);
    g.setBackgroundColor (Color.WHITE);
    Super.Paint (g);
    }
    };

    As you can see, the two are LabelFields with graphics by placing of the same color. It makes no repeat the code point and would be better to be able to pass information to a function to set the color for label... Creating a class using a variable public to access the info above which is converted into a string before being passed to the LabelField control. Each LabelField will be in the same format:

    LabelName (sText + ":" + sText2, DrawStyle.LEFT);

    or

    MyLabelName ("owner", PhonesOwner(), DrawStyle.LEFT);

    producing a

    Owner: [name of the owner of some here]

    Following label:

    The owner Info: [info from the owner here]

    and so on

    That's what I wrote, but doesn't seem to work:

    ' Public Sub SetGreenLabel (field field, String sLabelText, String sFunctionName)
    {
    field = new LabelField (sLabelText + ":" + sFunctionName, DrawStyle.LEFT)
    {
    public void paint (Graphics g)
    {
    g.setColor (Color.DARKGREEN);
    g.setBackgroundColor (Color.WHITE);
    Super.Paint (g);
    }
    };
    };

    May extend to pass the ForeColor as parameter

    ' Public Sub SetLabelColour (String sLabelText, String sFunctionName, PlayStations color field, field)
    {
    field = new LabelField (sLabelText + ":" + sFunctionName, DrawStyle.LEFT)
    {
    public void paint (Graphics g)
    {
    g.setColor (cColour);
    g.setBackgroundColor (Color.WHITE);
    Super.Paint (g);
    }
    };
    };

    Perhaps an overload of the function as follows:

    SetLabelColour (String sText, String sText2)

    SetLabelColour (String sText2, String sText, color cForeColour)

    SetLabelColour (String sText2, String sText, cBackColour color, color cForeColour)

    My public variable

    MyClass mc = new MyClass();

    Label

    LabelField lf1;

    MC. SetLabelColour (lf1, 'Owner', PhonesOwner());

    Any ideas on how to write the correct functions?

    Thanks in advance

    Sure. Here is a more elaborate version of the idea of the subclass that has multiple constructors, commented to indicate what is happening. I have also set the colours.

    public class ColorLabelField extend LabelField {    /** Foreground color */    private int fg;
    
        /** Background color */    private int bg;
    
        /**     * Construct a ColorLabelField with empty text, default     * colors of dark green foreround and white background,     * and default style as determined by LabelField.     */    public ColorLabelField() {        this("", Color.DARKGREEN, Color.WHITE);    }
    
        /**     * Construct a ColorLabelField with indicated initial text,     * foreground and background colors, and default style.     * @param text the initial text     * @param fg the foreground color for the text     * @param bg the background color for the text     */    public ColorLabelField(String text, int fg, int bg) {        super(text);        this.fg = fg;        this.bg = bg;    }
    
        /**     * Construct a ColorLabelField with indicated initial text,     * foreground and background colors, and style.     * @param text the initial text     * @param fg the foreground color for the text     * @param bg the background color for the text     * @param style the style for the field     */    public ColorLabelField(String text, int fg, int bg, long style) {        super(text, style);        this.fg = fg;        this.bg = bg;    }
    
        /* No Javadoc comment. Just because. :) */    public void paint(Graphics g) {
            g.setColor(fg);
            g.setBackgroundColor(bg);
            super.paint(g);
        }
    }
    

    If you wish, you can add accessor functions to set the foreground and background colors after the ColorLabelField was built. As written, once you create them, the colors are immutable. (As far as the style of any field bits are immutable). If you add these accessor functions, you should consider if disabled then automatically the field when colors are changed or if it must remain until the client code to invalidate after everything he's done.

  • Default user name?

    Hello

    Is there a way to get the name of the user of the device?

    Thank you

    Ty

    Hello!

    Take a look at the net.rim.device.api.system.OwnerInfo class

  • Definition of owner app information

    As shown in the API, there's an OwnerInfo class. This class provides two functions, one of those who is called getOwnerInformation(). But is it possible to set owner information as well?

    No, there is no API to set owner information.

Maybe you are looking for

  • App Store updates always shown available after update

    Can someone help a Novice i.t.? I've updated my different apps on my iPad, but the icon App Store shows that they're waiting to be updated on my sync would be the iPhone. When I open the App Store on my iPhone, it shows that they have been updated be

  • Satellite A30 554: start and stop the question automatically

    After about a year of use my computer laptop (Satellite A30 554) started having problems with the starter. Quite often when I turn it on cooler starts working and the LEDs are showing that the computer is on, but the screen remains black. Sometimes,

  • CAPS LOCK INDICATOR FOR ASPIRE V3 - 571

    I have a new Acer Aspire 571 V3 and I can not see when my selections are on or off. How to solve this

  • WIndows Live essentials update

    Hi, yesterday I sent myself spam email (was a friend so I opened) and as I did I got a pop up in the bottom right of my screen saying windows live essentials has an update.  It seems a bit suspicious to me because I've never seen this before pop-up,

  • Txt of blackBerry Smartphones

    When I receive a txt with the sound it mess my phone. I'll try to make a phone call and it will say Iam connected but I can't hear anyone, but they can hear me. I then have to turn off the phone and remove the battery and really tired of this. Anyone