JDE 5.0.0 TransportInfo.getTransportDescriptors (int)

Hello

I'm new to the Blackberry development and is currently undergoing the 5.0.0 API and have a few questions about the TransportInfo.getTransportDescriptors (int) method.

The API said that this method returns an array of object of TransportDescriptors. My question is how can I get a single TransportDescriptor object given a transportType?

Thank you

There is no way to get a unique TransportDescriptor, because almost all forms of communication on the BlackBerry has more of a path.

For the watch of the info:

http://www.BlackBerry.com/DevMediaLibrary/view.do?name=NetworkingTransportsII

Tags: BlackBerry Developers

Similar Questions

  • Error 401 on Twitter device

    Hi I Don t know why my fall of code on 9700 OS 5, I try in OS6 9300, 9780 OS 6 and all devices with 0 7 s and the same code work as expected.

    I take this forum code, I don´t remenber where and to change some lines and constant.

    all devices of returned code 200 but 9700 give me a 401

    Help, please

    public static String requestToken(){
            String url = Const.REQUEST_TOKEN_URL;
            String header = oauth_header(url, HttpProtocolConstants.HTTP_METHOD_GET);
            String requestTokenUrl = concatURL(url, header);
            System.out.println(requestTokenUrl);
            HttpsConnection connection = null;
            InputStream input = null;
            try{
                connection = (HttpsConnection) HttpUtils.getConfiguredConectionFactory().getConnection(requestTokenUrl).getConnection();
                connection.setRequestMethod(HttpProtocolConstants.HTTP_METHOD_GET);
                connection.setRequestProperty("WWW-Authenticate","OAuth realm=http://twitter.com/");
                connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
    
                input = connection.openDataInputStream();
                int resp = connection.getResponseCode();
                if (resp == HttpConnection.HTTP_OK) {
                    StringBuffer buffer = new StringBuffer();
                    int ch;
                    while ( (ch = input.read()) != -1){
                        buffer.append( (char) ch);
                    }
                    String content = buffer.toString();
                    Const.token = content.substring(content.indexOf((Const.OAUTH_TOKEN+"="))+(Const.OAUTH_TOKEN+"=").length(), content.indexOf('&'));
                    Const.tokenSecret = content.substring(content.indexOf((Const.OAUTH_TOKEN_SECRET+"="))+(Const.OAUTH_TOKEN_SECRET+"=").length(), content.length());
    
                }else{
                      StringBuffer buffer = new StringBuffer();
                      int ch;
                      while ( (ch = input.read()) != -1){
                          buffer.append( (char) ch);
                      }
                      String content = buffer.toString();
                      System.out.println("request Error: " + content);
                }
                return Const.token;
                //return (getTwitterMessage(connection.getResponseCode()));
            } catch (IOException e) {
                return "IOexception";
            } catch (TransactionException nc) {
                return "noConnection";
            } catch (Exception e) {
                return "Exeption";
            } finally {
                try {
                    connection.close();
                    input.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    
    public static ConnectionFactory getConfiguredConectionFactory(int timeout){
            int[] allow ={
                    TransportInfo.TRANSPORT_TCP_CELLULAR
            };
            int[] denny ={
                    TransportInfo.TRANSPORT_MDS,
                    TransportInfo.TRANSPORT_WAP,
                    TransportInfo.TRANSPORT_TCP_WIFI,
                    TransportInfo.TRANSPORT_WAP2,
                    TransportInfo.TRANSPORT_BIS_B
    
            };
            ConnectionFactory factory = new ConnectionFactory();
            factory.setEndToEndDesired(false);
            factory.setEndToEndRequired(false);
            factory.setPreferredTransportTypes( allow);
            factory.setDisallowedTransportTypes(denny);
            factory.setAttemptsLimit(3);
            factory.setConnectionMode(ConnectionFactory.ACCESS_READ_WRITE);
            factory.setTimeoutSupported(true);      
    
            factory.setTransportTypeOptions(TransportInfo.TRANSPORT_TCP_CELLULAR,telefonicaAPN );
            factory.setConnectionTimeout(timeout);
            factory.setTimeLimit(timeout);
                    return factory;
    }
    
    public static String oauth_header(String url, String method) {
            String nonce = nonce();
            long timestamp = timestamp();
            Hashtable pairs = new Hashtable();
    
            pairs.put(Const.OAUTH_CONSUMER_KEY, Const.consumerKey);
            pairs.put(Const.OAUTH_NONCE, nonce);
            pairs.put(Const.OAUTH_SIGNATURE_METHOD, Const.SIGNATURE_METHOD);
            pairs.put(Const.OAUTH_TIMESTAMP, Long.toString(timestamp));
            if(Const.token != null) {
                pairs.put(Const.OAUTH_TOKEN, Const.token);
                //pairs.put(OAUTH_VERIFIER, verifier);
            }
            pairs.put(Const.OAUTH_VERSION, "1.0");
            pairs.put(Const.OAUTH_CALLBACK, Const.CALLBACK_URL);
            String sig = signature(method, url, pairs);
            //pairs.put(Const.OAUTH_SIGNATURE, escape(sig));
    
            StringBuffer header_sb = new StringBuffer();
            if(method.equals("GET"))
            {
                String comma = ",";
                header_sb.append(Const.OAUTH_CONSUMER_KEY).append("=").append(URLUTF8Encoder.encode(Const.consumerKey)).append(comma);
                header_sb.append(Const.OAUTH_NONCE).append("=").append(nonce).append(comma);
                header_sb.append(Const.OAUTH_SIGNATURE).append("=").append(URLUTF8Encoder.encode(sig)).append(comma);
                header_sb.append(Const.OAUTH_SIGNATURE_METHOD).append("=").append(URLUTF8Encoder.encode(Const.SIGNATURE_METHOD)).append(comma);
                header_sb.append(Const.OAUTH_TIMESTAMP).append("=").append(Long.toString(timestamp)).append(comma);
                if(Const.token != null) {
                    header_sb.append(Const.OAUTH_TOKEN).append("=").append(URLUTF8Encoder.encode(Const.token)).append(comma);
                }
                header_sb.append(Const.OAUTH_VERSION).append("=").append("1.0").append(comma);;
                header_sb.append(Const.OAUTH_CALLBACK).append("=").append(URLUTF8Encoder.encode(Const.CALLBACK_URL));
            }
            else if(method.equals("POST"))
            {
                header_sb.append(Const.OAUTH_CONSUMER_KEY).append("=").append(URLUTF8Encoder.encode(Const.consumerKey)).append("&");
                header_sb.append(Const.OAUTH_NONCE).append("=").append(nonce).append("&");
                header_sb.append(Const.OAUTH_SIGNATURE).append("=").append(URLUTF8Encoder.encode(sig)).append("&");
                header_sb.append(Const.OAUTH_SIGNATURE_METHOD).append("=").append(URLUTF8Encoder.encode(Const.SIGNATURE_METHOD)).append("&");
                header_sb.append(Const.OAUTH_TIMESTAMP).append("=").append(Long.toString(timestamp)).append("&");
                if(Const.token != null) {
                    header_sb.append(Const.OAUTH_TOKEN).append("=").append(URLUTF8Encoder.encode(Const.token)).append("&");
                    //header_sb.append(OAUTH_VERIFIER).append("=").append(escape(verifier)).append("&");
                }
                header_sb.append(Const.OAUTH_VERSION).append("=").append("1.0").append("&");
                header_sb.append(Const.OAUTH_CALLBACK).append("=").append(Const.CALLBACK_URL);
            }
            return header_sb.toString();
        }
    

    Well I found the solution to al my headache, the phone are the incorrect time and that the reason for this same code fails in this terminal

  • IllegalArgumentException in PIMItem.getString (int, int)

    int[] intarray = cont.getFields();
    for(int x = 0; x < intarray.length; x++)
    {
        System.out.println(cont.getString(intarray[x],0));
    }
    

    This is just one example of code, but it throws the same exception is my real application.  Suite is a Contact object that I've initialized from the context object in the address book.  Whenever I get to the line getString, it throws an IllegalArgumentException for anything other than the constant of PIMItem.TEL despite the fact that other objects are not null.  I develop for the Blackberry 7290 with Handheld Software version 4.1 and JDE version 4.1.  Is there a reason that I'm getting this exception?

    EDIT: Sorry, Contact.TEL not PIMItem

    You don't want to read a string if it * is * a string.  Try something like:

    int[] intarray = cont.getFields();
    for(int x = 0; x < intarray.length; x++)
    {
        if (myPimList.getFieldDataType(intarray[x]) == PIMItem.STRING) {
            System.out.println(cont.getString(intarray[x],0));
        }
    }
    
  • How to write a program that allows an HTTPs connection to the APACHE TOMCAT server in blackberry JDE

    Hello.. I am very new to the blackberry JDE environment. But then, I have a project in which I should write a program that will make an HTTPs connection to the apache tomcat server using blackberry JDE. The simulator which I use is 8330-JDE.

    Here is my code...

    import java.io.IOException;

    Import java.io.InputStream;

    Import javax.microedition.io.Connector;

    Import javax.microedition.io.HttpsConnection;

    Import net.rim.device.api.ui.UiApplication;

    Import net.rim.device.api.ui.container.MainScreen;

    public class Httproto extends UiApplication

    {

    public public static void main (String [] args)

    {

    Httproto instance = new Httproto();

    instance.enterEventDispatcher ();

    }

    public Httproto()

    {

    pushScreen (new HttpsConnectionScreen());

    }

    }

    final class HttpsConnectionScreen extends screen

    {

    public HttpsConnectionScreen()

    {

    HttpsConnection c = null;

    InputStream is = null;

    int rc;

    try {String url =

    "https://192.168.2.3: 8443/cit/j_acegi_security_check? j_username = sanogo & j_password = redhat;

    c = (HttpsConnection) Connector.open (url);

    c.setRequestMethod (HttpsConnection.POST);

    System.out.println ("connection is open with the server");

    Get the response code is open the connection,

    Send the request and read HTTP response headers.

    The headers are stored until asked.

    RC = c.getResponseCode ();

    System.out.println ("response from the server" + rc);

    if (rc! = HttpsConnection.HTTP_OK) {

    throw new IOException ("HTTP response code:" + rc);

    }

    is = c.openInputStream ();

    Get the ContentType

    The string of type = c.getType ();

    The length and process data

    int len = (int) c.getLength ();

    if (len > 0) {

    int actual = 0;

    int BytesRead = 0;

    byte data = new byte[len]; while ((bytesread! = len) & (real! = - 1)) {

    real = is.read (data, bytesread, len - bytesread);

    bytesRead += real;

    }

    } else {}

    int ch;

    while ((ch = is.read (())! = - 1). {

    }

    }

    } catch (ClassCastException e) { throw new IllegalArgumentException ("not a HTTP URL");}

    }

    catch (IOException ioe) {}

    finally {

    Try

    {

    if (is! = null)

    is. Close();

    if (c! = null)

    c.Close ();

    }

    catch (IOException ioe) {}

    }

    }

    }

    When I run this program in the Simulator, I can do nothing. Please correct me if I'm wrong in coding.

    As I am new to this blackberry JDE environment, ideas and suggestions on how to write and run the sample applications in the blackberry are more welcomed.

    Concerning

    Hinduja

    Make sure that your MDS starts when the Simulator starts.  In the JDE will in Edition > Preferences > Simulator > General and click the checkbox "launch Mobile Data System connection with Simulator Service.

  • Problems with JDE Sample PictureBackgroundButtonField.java

    Hello world

    I use the JDE PictureBackgroundButtonField.java sample to create a button with a picture on it. It works fine, except that when I insert my application, the button is 'in focus' (watch the _onPicture) and won't not blurry. Can anyone understand this? Thank you!

    Here is the instantiation of the button:

    PictureBackgroundButtonField pic = new PictureBackgroundButtonField("Hello", DrawStyle.HCENTER);
            hfmBottom.add(pic);
    

    Here's the PictureBackgroundButtonField.java:

    /**
     * PictureBackgroundButtonField.java
     *
     * Copyright © 1998-2009 Research In Motion Ltd.
     *
     * Note: For the sake of simplicity, this sample application may not leverage
     * resource bundles and resource strings.  However, it is STRONGLY recommended
     * that application developers make use of the localization features available
     * within the BlackBerry development platform to ensure a seamless application
     * experience across a variety of languages and geographies.  For more information
     * on localizing your application, please refer to the BlackBerry Java Development
     * Environment Development Guide associated with this release.
     */
    
    package com.kflicks.ui.Custom;
    
    import net.rim.device.api.ui.*;
    import net.rim.device.api.system.*;
    
    /**
     * Custom button field that shows how to use images as button backgrounds.
     */
    public class PictureBackgroundButtonField extends Field
    {
        private String _label;
        private int _labelHeight;
        private int _labelWidth;
        private Font _font;
    
        private Bitmap _currentPicture;
        private Bitmap _onPicture = Bitmap.getBitmapResource("res/search_on.png");
        private Bitmap _offPicture = Bitmap.getBitmapResource("res/search_off.png");
    
        /**
         * Constructor.
         * @param text - the text to be displayed on the button
         * @param style - combination of field style bits to specify display
               attributes
         */
        public PictureBackgroundButtonField(String text, long style)
        {
            super(style);
    
            _font = getFont();
            _label = text;
            _labelHeight = _font.getHeight();
            _labelWidth = _font.getAdvance(_label);
            _currentPicture = _onPicture;
        }
    
        /**
         * @return The text on the button
         */
        String getText()
        {
            return _label;
        }
    
        /**
         * Field implementation.
         * @see net.rim.device.api.ui.Field#getPreferredHeight()
         */
        public int getPreferredHeight()
        {
            return _labelHeight + 4;
        }
    
        /**
         * Field implementation.
         * @see net.rim.device.api.ui.Field#getPreferredWidth()
         */
        public int getPreferredWidth()
        {
            return _labelWidth + 8;
        }
    
        /**
         * Field implementation.  Changes the picture when focus is gained.
         * @see net.rim.device.api.ui.Field#onFocus(int)
         */
        protected void onFocus(int direction)
        {
            _currentPicture = _onPicture;
            invalidate();
        }
    
        /**
         * Field implementation.  Changes picture back when focus is lost.
         * @see net.rim.device.api.ui.Field#onUnfocus()
         */
        protected void onUnfocus()
        {
            _currentPicture = _offPicture;
            invalidate();
        }
    
        /**
         * Field implementation.
         * @see net.rim.device.api.ui.Field#drawFocus(Graphics, boolean)
         */
        protected void drawFocus(Graphics graphics, boolean on)
        {
            // Do nothing
        }
    
        /**
         * Field implementation.
         * @see net.rim.device.api.ui.Field#layout(int, int)
         */
        protected void layout(int width, int height)
        {
            setExtent(Math.min( width, getPreferredWidth()),
            Math.min( height, getPreferredHeight()));
        }
    
        /**
         * Field implementation.
         * @see net.rim.device.api.ui.Field#paint(Graphics)
         */
        protected void paint(Graphics graphics)
        {
            // First draw the background colour and picture
            graphics.setColor(0x00EE3526);
            graphics.fillRect(0, 0, getWidth(), getHeight());
            graphics.drawBitmap(0, 0, getWidth(), getHeight(), _currentPicture, 0, 0);
    
            // Then draw the text
            /*graphics.setColor(Color.BLACK);
            graphics.setFont(_font);
            graphics.drawText(_label, 4, 2,
                (int)( getStyle() & DrawStyle.ELLIPSIS | DrawStyle.HALIGN_MASK ),
                getWidth() - 6 );*/
        }
    
        /**
         * Overridden so that the Event Dispatch thread can catch this event
         * instead of having it be caught here..
         * @see net.rim.device.api.ui.Field#navigationClick(int, int)
         */
        protected boolean navigationClick(int status, int time)
        {
            fieldChangeNotify(1);
            return true;
        }
    
    }
    

    Seems fine,

    What do you mean by go not blurred? When you create the button, it will be the onFocus image. If you want to give it focus, you need to add the parameter focusable,

    If your code should look like,

    PictureBackgroundButtonField pic = new PictureBackgroundButtonField("Hello", Field.FOCUSABLE | DrawStyle.HCENTER);
    
  • How do you see the System.out.println (without using Eclipse and BlackBerry JDE)

    Hi all

    I just want to know if there is no solution to see System.out.println.

    I use neither Eclipse nor BlackBerry JDE for my development.

    I have my jar, jad files. I convert my jar file using the CAP tool. The .cod files are generated.

    I start the trainer. Now I have 2 windows: Windows Simulor and the output (see picture).

    Then I load my .cod files. But I see not all System.out.println ("...") in the output windows.

    How can I see these System.out.println ("...")?

    Please help me.

    Thank you all.

    Thanks for your help.

    I try your solution EventLogger.

    But I have another problem:

    My request is not a native application (it is a midlet in J2ME, not a UIApplication). Do you think that it will work with EventLogger?

    How can I make a registry for EventLogger:

    static boolean register(long guid, String name) 
    Registers the name and the guid of the calling application.
    static boolean register(long guid, String name, int viewerType) 
  • what the? (ChoiceField) .getChoiceCached (int) online: 898 NullPointerException

    Why I get this error?   (ChoiceField) .getChoiceCached (int) online: 898 NullPointerException

    The ChoiceFeild object is not null.

    JDE 5.0, 1.6.latest, Windows XP pro 32-bit jdk 1.3.0 eclipse plugin

    The exception gives no message.

    Just found the bug, here's the code.

    Sort = new InData [X];       Suppose X 4 >
    Type [0] =...

    sort [1] =...

    Sort [2] =...

    Sort [3] =...

    That is the problem - the sorting matrix is defined over a length of X but is filled less of X items

    sortChoice = new TransparentObjectChoiceField ("", sort, 0, Field.FIELD_VCENTER, orig) {}
    {} public void paint (Graphics graphics)
    graphics.setColor (menuTextColor);
    Super.Paint (Graphics);
    }
    };

    It was hard to find because the exception was thrown only when the screen with the sortChoice object was pushed and then of course there were several of these objects on the screen so it is difficult to see who wants to go.

    Thank you.

  • IllegalArgumentException in SQLiteDemo on CodeSigningKey (int, String)

    Hi all

    I am trying to run the SQLiteDemo on my BlackBerry Simulator (5.0) (using Eclipse plug-ins, JDE). The project will build without any problem. When I try to launch the project of the Simulator, however, I get an IllegalArgumentException on CodeSigningKey.get (int, String) on line 308 of CodeSigningKey.class (whose source is not found).

    I suppose it comes from the following line of code in SQLiteDemo.java:

    // Retrieve the code signing key for the XYZ key file
            CodeSigningKey codeSigningKey = CodeSigningKey.get(CodeModuleManager.getModuleHandle( "SQLiteDemo" ), "XYZ");
    

    The values of int, String at this stage are:

    moduleHandle = 0

    signerId = XYZ

    I use the XYZ.key provided in the BlackBerry sqlitedemo.zip. Anyone know why I get this error?

    Thank you!

    My project was not «enabled for BlackBerry»

  • Preprocessing in Blackberry JDE plugin for Eclipse

    Hello

    Here's a piece of code

    //#preprocess
    public class Main {
    //#ifdef AAA
        int x;
    //#endif
        int x;
        x = 3;
    }
    

    If I run the JDE Eclipse plug in point 1.1, it works perfectly.

    However, when I use Eclipse 1.0 component package 4.2.1 plugn it does not work.

    Eclipse is said to 'Duplicate the field Main.x'. (I have not "define constants 'AAA')

    Any idea on this?

    Eclipse 1.0 and package 4.2 does support preprocessor?

    (I need to develop the application that support 4.2.1 so it is important to use JDE 1.0 eclipse plugins).

    Thank you in advance.

    I found the solution:

    Define an arbitrary Constanst (preprocessor definitions) in the project properties.

    That activates the function "preprocessing" of eclipse and everything works fine.

  • PIM and "non-standard properties." RIM; JDE 4.3.0

    Hello community!

    I'm introducing some non-standard properties in the VCALENDAR from my Blackberry. Even if I think I have to comply with the RFC 2445, sect 4.8.8.1, my application will not work. I guess the menthod 'commit()' kill everything I put in. Is there another way to bypass the call 'commit() '?

    Code:
    -----------------------------------------------------------------------------------------------------------
    import java. IO;
    Import Java.util;

    Javax.microedition.pim import. *;

    Net.rim.device.api.ui import. *;
    Net.rim.device.api.ui.component import. *;

    .
    .
    .

    Get the PIM Instance
    PIM pim = PIM.getInstance ();

    Download EventList in RW mode
    EventList el = (EventList) pim.openPIMList (PIM. EVENT_LIST, PIM. READ_WRITE);

    Get elements of EventList
    Enumeration e = el.items ();

    simplified recovery of the first event.
    Any of the proofs advanced, I know that there is one in there
    Event c = (Event) e.nextElement ();

    Get the serialized event
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    String [] dataFormats = pim.supportedSerialFormats (PIM. EVENT_LIST);
    pim.toSerialFormat (c, output, "UTF8", dataFormats [0]);

    serialized event to Convert to a string
    String serialEvent = output.toString ();

    view the content on-screen
    Add (new SeparatorField());
    Rtf RichTextField = new RichTextField();
    rtf.setText (serialEvent);
    Add (new SeparatorField());

    //
    In order to see if the changes I make are actually applid
    at the event in the PIM, I change the "DESCRIPTION:" field. He
    contains the text "this is a Note."
    //

    TEMP and target String
    String _tmp;
    _New string;

    changing the text in ' DESCRIPTION:'. I put a '-' in front of it
    _Pos int = serialEvent.indexOf ("he is a");
    _TMP = serialEvent.substring (0, _pos) + "-" + serialEvent.substring (_pos, serialEvent.length ());

    end of search for VCALENDAR statement...
    _Pos = _tmp.indexOf("END:VCALENDAR");

    ... and insert the X property according to the RFC 2445 4.8.8.1 sect.
    _new = _tmp.substring (0, _pos) + 'X-XXX-XXX; XXXTYPE-XXX-X = XXX:MyType "+"\r\n"+ _tmp.substring (_pos, _tmp.length ());

    Change is made. Check the on-screen
    RichTextField rtf_4 = new RichTextField();
    rtf_4.SetText (_new);
    Add (rtf_4);
    Add (new SeparatorField());

    //
    Change seems good. Now, put it to the PIM
    //

    kill the original event
    el.removeEvent (c);

    prepare the flow
    Bais ByteArrayInputStream = new ByteArrayInputStream (_new.getBytes ());

    Create PIM Item _new String (as amended)
    PI [] PIMItem = pim.fromSerialFormat (chestnut, "UTF8");

    create a new element of PIM event
    Event newEv = el.importEvent ((Event) IP [0]);

    and now commit event to PIM
    newEv.commit ();

    Close EventList
    El.Close ();
    -----------------------------------------------------------------------------------------------------------

    As indicated in the comments of the modified code serialized event seems ok. The transition to the event in the DESCRIPTION: field was resumed and is visible in the normal case in the calendar on the phone app. If the data changes and the commit() stuff works. But the X property is filtered and not applied. What I see when I run my application a second time and check the VCALENDAR entry serialized on the screen.

    I'm not sure the correct location of the X property. I tried it immediately before the ' END: VEVENT ", as well as before" END: VCALENDAR ". None of them works.

    Someone who knows how to successfully add X-properties?

    BlackBerry JDE 4.3.0

    Thanks for your time!

    Kind regards

    Carsten

    The set of BlackBerry API does not support the addition of custom in the PIMItems fields.

  • IntelliSense in JDE and Eclipse PlugIn

    Newbie here! I need to develop to the 5.0 platform. I downloaded JDE for 5.0 and got example HelloWorld working. My previous 2 years were with Eclipse so after a lot of frustration, I have Eclipse Helios working with the pack 5.0 component. But I noticed on the JDE and Eclipse that intellisense does not seem to be available / work. In other words, if I type:

    Dim myString As String = "";

    int myInt = 0;

    myInt = myString.

    I'm expecting the IDE to display the methods available for the String object immediately after my typing of the period. Do BB d and Eclipse Plugins support this, and if so, any idea why this doesn't work?

    Thanks in advance!

    In JDE, go to Edit/Preferences/Editor/semi-automatic and select:

    Include the java.lang.Object methods...

    Not sure why this is not however the default value.

    In Eclipse, it seems to work, but I don't know why (I won't change anything).

    I'm good to go for now!

    TX for the ear!

  • Rookie move BB JDE 5.0 beta 2 Simulator

    Hi all

    does anyone know a solution for this:

    Just installed the BB JDE 5.0 beta 2 and imported samples. When I then try to debug the example HelloWorld Simulator stops before the operating system is on the rise. In the debugger, I can see the following lines:

    Thread [net_rim_bb_rich_email (97) id = 104253440] (Suspended (RuntimeException exception))

    -ApplicationRegistry.waitForObjectToBeRegistered (SingletonMonitor, int, long, boolean, CodeSigningKey, CodeSigningKey, boolean) online: 439

    -Line ApplicationRegistry.getOrWaitFor (log): 152

    -Line OutgoingDeviceAgentCollection.getInstance (): 384

    -Line RichContentEmail.main (String []): 51

    What could be?

    Help, please. Thanks for any help in advance.

    Concerning

    Andreas

    "Do you think the BB JDE is a better choice then the plugin eclipse?"

    Only if you have grown up with the JDE and can put up with its limits.  As a newbie, I'd give it a miss.

    Your topic says JDE, maybe you should close this thread and open a new one which says Eclipse...

  • Location of the App on JDE

    Hi all

    I went through the tutorial to locate . But I have that contains the location on Eclipse steps. I tried it and it works fine. But I am little confused on JDE. If anyone can help me on JDE.

    I can create a language using New-> project-> language resource resource. For example, I created in the com.company.blackberry.samplelocalizedapp package. In this, I have .rrh and .rrc files. Now I don't know if I can add my code for the application here and go.

    But conversely, I already have a project said HelloWorldApplication in the com.company.blackberry.HelloWorldApplication package. I don't find a way to create files of resources here. Also I can not create a language resource in the com.company.blackberry.HelloWorldApplication package, UPS already have another project with the same name. And language resource name must match the project. Can't we do similar to eclipse at once in the same project. As eclipse gives the possibility to create new resources instead of project resource file (I hope that makes sense).

    One last thing, I don't know what is the reason for LanguageResourceInterface to keep it invisible. We need to extract JAR. I thought we need to decompile the resource project of languages, to create an Interface for the second project by copying the code of the file decompiled. And copy the necessary resources for the project. But I don't think it's the right approach.

    Or can we create the project as a linguistic resource itself and then add the code from our application?

    I'm sorry if I seem confused, but please help me understand this clearly.

    I this was posted earlier but could not understand, so posting again according to the instructions of Mark Sohm (do not ask question in resolved thread)

    Thank you

    Sandeep

    mantaker is correct, that you create the resource with the JDE files.
    they use a special java format, if you want to change them by hand, you can do it with prbeditor https://prbeditor.dev.java.net (just rename their properties, edit them and rename them back).

    I do not use the eclipse plugin (but develop in eclipse), that's what I do:
    -a set of resources
    -create a new language resource file by clicking on file-> New-> projects-> language resource
    -a Wizard opens where you can add languages, ultimately the language files are created
    -create an interface in eclipse with a long BUNDLE_ID and a string BUNDLE_NAME. It contains a constant int with the same name as the language file. the value is not important (= 0 is sufficient). This file is not used by JDE/CAP, it is only to betray Eclipse them.
    (you can skip this step if you are developing in the JDE. Please apply with the local therapist and at least try a decent development environment)

  • ApplicationMenuItem called with null in JDE 4.6 when you enter the phone number

    When I install a custom phone app, ApplicationMenuItem and

    try to enter a number on the keypad of the native Dialer, and then click the custom menu,

    my custom ApplicationMenuItem is called with a null context object.

    This same code + test case works well under the 4.5 JDE / 8300 emulator

    and device 8320, but fails under JDE 4.6 with the BB 9000 emulator

    and device

    To reproduce the bug:

    * Build/launch of the attached test application

    * Send with previous key

    * Go to the native Dialer

    * Enter "123" on the keyboard of the phone

    * Click on the trackball

    * Choose Bug49 the context menu

    * It will appear a dialog box indicating "context has the null value - is this a bug?

    NOTE that if, rather than enter a number on the keypad of the phone with step 4.

    a call log is selected, then it works and a non-null context object is passed.

    Can I make it work?  If this is a known bug, are

    It no work around?

    import net.rim.blackberry.api.menuitem.ApplicationMenuItem;import net.rim.blackberry.api.menuitem.ApplicationMenuItemRepository;import net.rim.device.api.ui.UiApplication;import net.rim.device.api.ui.component.Dialog;import net.rim.device.api.ui.component.LabelField;import net.rim.device.api.ui.component.RichTextField;import net.rim.device.api.ui.container.MainScreen;
    
    public class Bug49 extends UiApplication { public Bug49()    {     super();      Bug49Screen screen = new Bug49Screen();       pushScreen(screen);       ApplicationMenuItemRepository amir = ApplicationMenuItemRepository.getInstance();     Bug49NativeMenu bug49NativeMenu = new Bug49NativeMenu(0);     amir.addMenuItem(ApplicationMenuItemRepository.MENUITEM_PHONE, bug49NativeMenu ); }
    
      public static void main(String[] args) {      Bug49 b49 = new Bug49();      b49.enterEventDispatcher();   }
    
       static class Bug49Screen extends MainScreen {     public Bug49Screen() {            super();          setTitle(new LabelField("Hello"));            add(new RichTextField("Hello"));      } }
    
      static class Bug49NativeMenu extends ApplicationMenuItem  {     public Bug49NativeMenu(int order) {           super(order);     }     public Object run(Object context) {           if (context == null) {                Dialog.alert("context is null -- is this a bug?");            }         else {                Dialog.alert("context not null");         }         return null;      }     public String toString() {            return "Bug 49";      } }}
    

    It is a problem in the version of BlackBerry device software 4.6.0.  It has been fixed in version 4.7.0.

  • MenuItem / JDE 4.5

    I created an app for JDE 4.7 and have managed to add menus using the following code:

    private class AboutScreen extends MainScreen {
        public AboutScreen() {
            super();
                setTitle(" About");
                LabelField about = new LabelField();
                about.setText("Some text");
                add(about);
        }
    }
    
    private MenuItem _aboutItem = new MenuItem("About", 110, 100) {
        public void run() {
            _aboutScreen = new AboutScreen();
            UiApplication.getUiApplication().pushScreen(_aboutScreen);
        }
    };
    
    private class HelpScreen extends MainScreen {
        public HelpScreen() {
            super();
            setTitle(" Help");
            LabelField about = new LabelField();
            about.setText("Some text");
            add(about);
        }
    }
    
    private MenuItem _helpItem = new MenuItem("Help", 120, 100) {
        public void run() {
            _helpScreen = new HelpScreen();
            UiApplication.getUiApplication().pushScreen(_helpScreen);
        }
    };
    
    //create a menu item for users to close the application
    private MenuItem _closeItem = new MenuItem("Close", 200000, 10) {
        public void run() {
            onClose();
        }
    };
    
    //override makeMenu to add the new menu items
    protected void makeMenu( Menu menu, int instance ) {
        menu.add(_aboutItem);
        menu.add(_closeItem);
        menu.add(_helpItem);
    }
    

    When I compile the same application using JDE 4.5, the application compiles without any problem. The application runs as well. However, when I select the menus I add (comments or help), I get a "JVM error 104 Eception: IllegalStateException. Once I click on continue, the menu screen appears however the labelField does not work.

    Can someone point me in the right direction? I am a new developer to learn the tricks of the trade. Look through the forums, I found nothing useful found in my particular case. I appreciate any input that helps me learn what I am doing wrong.

    I don't know what I thought when I started to fill a labelField with text and layout form then she. I should have used a RichTextField from the outset. I changed the labelField for RichTextFields in my two menu items and all is well. No more error JVM 104.

    When I said I'm new to application development, I really wanted to say that I am new to application development. I find that what I have learned in my classes of college only takes you so far. You must get your nose to the grindstone and write applications to get the experience to know what works and what does not work.

    In any case, I appreciate your comments as well as the entrance, I got Peter.

Maybe you are looking for

  • cannot delete an external hard drive. stuck to decrypt for hours

    I tried to erase and reuse a disk that was previously encrypted.  Disk utility tells me. Clear process failed: Dismounting drive, could not open the device. Operation failed... » I tried several suggestions from other threads, as drive reboot, restar

  • How to stop FireFox 9 to move to a tab newly opened?

    As the title suggests, several times when I click on "Open in new tab", Firefox going to (or is), which is annoying as HELL! IE had this option and no way to turn it off for a while and has been one of my main reasons to switch to Firefox. Now, it se

  • Upgrading RAM on Satellite A40 - VH3

    I want to upgrade the memory of my laptop Satellite A40 - VH3 from 512 MB to 1 or 2 GB. If someone could confirm this - it is my understanding that there are already 2 sticks of 256 MB PC2100 (266) DDR RAM in the laptop (from factory). The maximum th

  • upgrade of ram 80 G50

    Hey, I have a questions upgrades support g50 - 80 dual channel 2 x 4 GB of ram? What is the frequency of the memory max this notebooks supports? and the ram type low voltage or regular? Thank you!

  • When I start a mission on an old game, Mechwarrior 4 vengeance a mistake happens sayoing: STOP Invailid allowance, 0 bytes.

    original title: Please Help, Im deperate When I start a mission on an old game, Mechwarrior 4 vengeance a mistake happens sayoing: STOP Invailid allowance, 0 bytes.  His extremely annoying because ive been looking for this game for 4 years.