Invoke.invokeApplication locking device

I am trying to call Invoke.invokeApplication to open the e-mail editor. The device I tested on doesn't have an email account setup, so I get the dialog box saying "no accounts available. You will only be able to save a draft"(or something like that). It's fine and expected. However, when I click on Ok to close the dialog box, the application crashes.

The device, on which I test is a Pearl 8130 from Sprint.

I'll call you the next code in the keyPressed Web Manager:

I think I solved my problem.

In the method of keyDown() KeyListener, I added the following code:

If (! isShown ())
Returns false;

That seemed to do the trick.

If there is still something not right about this approach, I would appreciate your opinion.

Thank you

Tags: BlackBerry Developers

Similar Questions

  • Problem with 'Invoke.invokeApplication' on 7.1 OS later

    We find that problems with:

    Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, call);
    

    throw

    java.lang.RuntimeException:Could not start internal application
    

    on 7.1 OSes such as 7.1.0.1098 and especially on a variety of devices * when the device is locked password (but not when locked screen).  We have seen this on earlier versions of 7.1 (such as 7.1.0.821 and below).  I see no changes documented between for example invoke 7.0.0 and 7.1.0 - anyone any idea?

    * including 9320, 9360 and 9790

    Which seems to be the case, this is the option "Allow outgoing calls so that locked" (in the Options / security / password), which was just a way to allow users to launch manual calls for password locked screen, now also applies to applications as well.  Definition of this indicator in options (assuming that you are not prevented to do so by BES policy) allows applications to make calls when the password locked again.

  • Encountered error Invoke.invokeApplication to AddressBookArguments?

    Hello! I think I found a bug for Addressbookarguments on JDE 4.7 version sibulator.

    the following code generates the exception of NULL, but however this code works fine on 4.5 and 5.0 beta.

    Invoke.invokeApplication (Invoke.APP_TYPE_ADDRESSBOOK, new AddressBookArguments (AddressBookArguments.ARG_NEW));

    I'm doing something worng?

    /////////////////////////////////////////////////////////////////////////

    public class test0 extends UiApplication {}
    public test0() {}
    TScreen s = new TScreen();
    this.pushScreen (s);
    }
     
    Public Shared Sub main (String [] args) {}
    new test0 () .enterEventDispatcher ();
    }
    }

    class TScreen extends form {}
    public TScreen() {}
    Application.getApplication () .requestForeground ();
    Invoke.invokeApplication (Invoke.APP_TYPE_ADDRESSBOOK, new AddressBookArguments (AddressBookArguments.ARG_NEW));
    }
    }

    I don't know if this is happening on the device real or not.

    But I solved the problem! Rather than use a consturctor of parameters, use two parameters constuctor! It works very well with the argument two constuctor of AdressbookArguments with the new instance of Contact.

    I think it's a bug.

  • Invoke.invokeApplication to make a call opens everything else

    Install Eclipse version 3.4.1

    JDE 4.5 (with the Simulator)

    I have a few methods that I put inside my derived class of MenuItem. However, when I click on one that is supposed to just make a phone.  I can make a phone call successfully, but when I return to the application, a blank text message is open, and then click back to a new empty event in the calendar, then a void new AddressBook so?  I just want to make a phone call, new SMS populated or etc.

    I made a new class which extends MenuItem and the following functions are called a switch statement in the run() method.

      /**  * Action: Make a phone call     */ public void runPhoneCall() {        PhoneArguments call = new PhoneArguments(PhoneArguments.ARG_CALL, this.phoneNumber);        Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, call);  }   /**  * Action: Create an SMS     */ public void runSms() {      MessageConnection mc = null;        try {           mc = (MessageConnection) Connector.open("sms://");      } catch (IOException e) {       }       TextMessage textMessage = (TextMessage) mc              .newMessage(MessageConnection.TEXT_MESSAGE);        textMessage.setAddress("sms://" + this.smsPhoneNumber);     textMessage.setPayloadText(this.smsContent);        Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES,              new MessageArguments(textMessage)); }   /**  * Action: Create an E-mail  */ public void runEmail() {        MessageArguments messageArguments = new MessageArguments(               MessageArguments.ARG_NEW, this.emailAddressTo,              this.emailSubject, this.emailBody);     Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, messageArguments);   }   /**  * Action: Open the browser and go to a website URL  */ public void runBrowser() {      BrowserSession browserSession = Browser.getDefaultSession();        browserSession.displayPage(this.websiteUrl);    }   /**  * Action: Add a contact to the address book     */ public void runAddToAddressBook() {     ContactList contactList = null;     try {           contactList = (ContactList) PIM.getInstance().openPIMList(                  PIM.CONTACT_LIST, PIM.WRITE_ONLY);      } catch (PIMException e) {      }       if (contactList == null)            return;     Contact contact = contactList.createContact();      if (contact == null)            return;     String[] name = new String[contactList.stringArraySize(Contact.NAME)];      String[] address = new String[contactList.stringArraySize(Contact.ADDR)];       try {           name[Contact.NAME_GIVEN] = this.addressBookName;            if (addressBookAddressStreet != null)               address[Contact.ADDR_STREET] = this.addressBookAddressStreet;           if (addressBookAddressLocality != null)             address[Contact.ADDR_LOCALITY] = this.addressBookAddressLocality;           if (addressBookAddressPostalCode != null)               address[Contact.ADDR_POSTALCODE] = this.addressBookAddressPostalCode;           if (addressBookAddressCountry != null)              address[Contact.ADDR_COUNTRY] = this.addressBookAddressCountry;     } catch (IllegalArgumentException e) {      }       if (this.addressBookPhone1 != null) {           if (contactList.isSupportedField(Contact.TEL)                   && contactList.isSupportedAttribute(Contact.TEL,                            Contact.ATTR_WORK)) {               contact.addString(Contact.TEL, Contact.ATTR_WORK,                       this.addressBookPhone1);            }       }       if (this.addressBookPhone2 != null) {           if (contactList.isSupportedField(Contact.TEL)                   && contactList.isSupportedAttribute(Contact.TEL,                            Contact.ATTR_HOME)) {               contact.addString(Contact.TEL, Contact.ATTR_HOME,                       this.addressBookPhone2);            }       }       if (this.addressBookFax != null) {          if (contactList.isSupportedField(Contact.TEL)                   && contactList.isSupportedAttribute(Contact.TEL,                            Contact.ATTR_FAX)) {                contact.addString(Contact.TEL, Contact.ATTR_FAX,                        this.addressBookFax);           }       }       if (this.addressBookEmail != null) {            if (contactList.isSupportedField(Contact.EMAIL)                 && contactList.isSupportedAttribute(Contact.EMAIL,                          Contact.ATTR_WORK)) {               contact.addString(Contact.EMAIL, Contact.ATTR_WORK,                     this.addressBookEmail);         }       }       if (this.addressBookWebsite != null) {          if (contactList.isSupportedField(Contact.URL)) {                contact.addString(Contact.URL, 0, this.addressBookWebsite);         }       }       // TODO: Use ARG_NEW or ARG_COMPOSE?        Invoke              .invokeApplication(Invoke.APP_TYPE_ADDRESSBOOK,                     new AddressBookArguments(AddressBookArguments.ARG_NEW,                              contact));  }   private static final int CALENDAR_TIME_PADDING = 7200000;   /**  * Action: Open the Calendar and add an appointment event.   */ public void runAddCalendarEvent() {     Event event = null;     EventList eventList = null;     try {           eventList = (EventList) PIM.getInstance().openPIMList(                  PIM.EVENT_LIST, PIM.READ_WRITE);            event = eventList.createEvent();        } catch (PIMException e) {      }       if (eventList != null && event != null) {           if (this.calendarEventSummary != null) {                if (eventList.isSupportedField(Event.SUMMARY))                  event                           .addString(Event.SUMMARY, 0,                                    this.calendarEventSummary);         }           if (this.calendarEventLocation != null) {               if (eventList.isSupportedField(Event.LOCATION))                 event.addString(Event.LOCATION, 0,                          this.calendarEventLocation);            }           long startTime = System.currentTimeMillis() + CALENDAR_TIME_PADDING;            event.addDate(Event.START, 0, startTime);           event.addDate(Event.END, 0, startTime + CALENDAR_TIME_PADDING);         Invoke.invokeApplication(Invoke.APP_TYPE_CALENDAR,                  new CalendarArguments(CalendarArguments.ARG_NEW, event));       }   }
    

    Y at - it something I am doing wrong?

    Sorry for the mess.  I actually found the problem.

  • Invoke.invokeApplication can display inside a handler

    Hi all

    I have a vertical feeder that has size equal to the display (height and width), my question is that how can I add

    VerticalFieldManager vr = new VerticalFieldManager();
    
    StringBuffer stringBuffer = new StringBuffer("");
                stringBuffer.append("");
                stringBuffer.append("");
                stringBuffer.append("");   
    
    vr.add(Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments( MapsArguments.ARG_LOCATION_DOCUMENT, stringBuffer.toString())));
    add(vr);
    

    How can I add the

    Invoke.invokeApplication  inside a vertical manager is that possibe 
    
    any help on this 
    
    Thanks SujithRavindran
    

    Hi simon,.

    If in our application, we use the mapfield I'll be able to scroll the map, just like the default blackberry card or is it simply displays an image of statistical map or so can u please help me with my doubt

    Thank you simon

  • How the LOCKING device to prevent its use in the case of lost/stolen device

    Hi, Im trying to implement a feature so that the device can be locked remotely in the case of the appliance is been lost/stolen.

    Is there a way to do this? Probably to set a password to unlock or unblock again.

    Thank you

    You can use the ApplicationManager.lockSystem method to lock the device.  There is no way to programmatically set a password.

    FYI what you describe is a feature of the BlackBerry Protect: http://us.blackberry.com/apps-software/protect/

  • Locked device of blackBerry Smartphones

    I've got a blackberrry "BOLD" that has not been used for some time. I have trid to run it from my regular blackberry lost the camera.

    I put a sim started upward. Pins for the card Sim has been accepted, but then he said: "the device is locked. He can't get through

    ?

    Hello!

    Your phone is locked to a specific service provider? If this is the case, call to ask for the unlock code.

    Another is that your device IMEI is blocked. Check with your operator.

  • root VRA locked device connection

    I was able to connect to my device via the web portal

    https://VRA.localdomain:5480

    as root

    but I can not connect using the same password on the console. IT says account locked.

    no idea how to reset?

    Try this.

    1

    In the VMRC console, log in as another user.

    2

    Check the number of connection attempts that have failed from the shell prompt.

    faillog u root_user ('root' just try if root_user does not work)

    3

    Unlock the account has failed.

    faillog u root_user - r

  • Passport for blackBerry locking device

    How can Hi I stop my ondemand product? Rather than wait until tocktime has passed.

    Hold down the power button / stop for a second and then tap on the lock

  • resetting the markers for multiple calls to invokeApplication BBMaps Invoke.APP_TYPE_MAPS...

    Hi, how can I reset before BB Maps markers

    Invoke.invokeApplication (Invoke.

    Call the APP_TYPE_MAPS, args)?

    Problem is that when I call BBmap using invokeApplication from code, using new or same, places it seems that old markers are not removed from the card and I want to show that NEW locations.

    Thank you in advance!

    Add "" at the beginning of your string containing your locations.

    Perhaps you have to name your document previous location, I my not quite sure

    Here is a link:

    http://docs.BlackBerry.com/en/developers/deliverables/1181/GPS%20and%20BlackBerry%20Maps%20Developme...

  • Attempts to display a map, but Eclipse invoke Access Restriction

    I'm going to show a card.

    For a simple test, I added this line of code:

    Invoke.invokeApplication (Invoke.APP_TYPE_MAPS, new MapsArguments());

    But Eclipse do not compile it.

    Import I use is:

    Import net.rim.blackberry.api.invoke.Invoke;

    Eclipse brand as a mistake and wrote:

    Access restrictions: type Invoke is not accessible because of the restriction on the required c library
    \Program Files\EclipseBlackBerry\plugins
    \Net.rim.Eide.componentpack4.3.0_4.3.0.8\components\lib\net_rim_api.jar

    I have signature keys and you have signed the programs successfully .cod file in Eclipse.

    Advice on how to make it work?

    It may have worked without seeming as if it were.

    Here is some info:

    (1) make sure you have your signing keys in the Eclipse plugin directory with the pot of consultation.  For me, it is:

    C:\Program Files\EclipseBlackBerry\plugins\net.rim.eide.componentpack4.3.0_4.3.0.8\components\bin

    (2) make sure that Eclipse is exitted.

    (3) start Eclipse and open a workspace with a Blackberry project who must sign.

    (4) don't "Project-> clean" doing 'Start a build immediately' be deselected.

    (5) ' project-> build together. "

    (6) "project-> build Blackberry Configuration Active ' (this already seems to have taken place of step 5, but just to make my repeatable steps I list here)

    (7) ' Blackberry-> request Signatures... '. "and a signature dialog box will pop up, if you don't leave eclipse as I said in step 2, you can get instead a dialog box open file for a file .cod, to match my instructions back to step 2 and exit Eclipse and continue with all the steps until you get back here.

    (8) application signatures (it will do 3 of the 6 listed points).

    (9) you are ready to debug, so run your project in the debugger and it should work (I have set Lock password, when I start debugging, Eclipse will appear a dialog box where I have to put my BB password, and if I get it wrong or close the dialog box, then I'm hosed and I must leave eclipse and start again and then when the BB Simulator starts I have to retype the word of) past).

    (10) once you are debugging, if you do leave NOT Eclipse, you can change the code and then perform steps 5, 6 and 9 to debug then (you don't need to obtain the signature done again - but if you try to log in again it will give you a dialog box asking a .cod file that you do not need to do do not.  One more thing, him debugs successive, that you just have to provide the password for the BB, I do not get a dialog of Eclipse asking for it).

    (11) If you don't never leave eclipse, I think we must return to the steps after #2 (you may be able to skip the signature again, but I have not tried yet - I don't want to ruin something that is good enough for now).

    Good luck!

  • Cannot close the invoked addressbook of background app.

    Hello

    I am unable to close invoked addressbook of background app.

    For help on;

    try {}
    {}
    signalStatus5 = net.rim.device.api.system.RadioInfo
    . getSignalLevel();
    Thread.Sleep (5000);
    } If (signalStatus5 == RadioInfo.LEVEL_NO_COVERAGE);

    int modHandle = CodeModuleManager.getModuleHandle ("setringTone");
    ApplicationDescriptor apDes [] = CodeModuleManager
    .getApplicationDescriptors (modHandle);
    ApplicationDescriptor descriptor = apDes [0];
    ApplicationManager.getApplicationManager () (.runApplication)
    Descriptor);
    Invoke.invokeApplication
    (
    Invoke.APP_TYPE_ADDRESSBOOK,
    new AddressBookArguments
    ());
    } catch (InterruptedException e) {}
    Generative TODO catch block
    e.printStackTrace ();
    } catch (ApplicationManagerException e) {}
    Generative TODO catch block
    e.printStackTrace ();
    }

    You cannot close another application programmatically. If the user closes the addressbook, it should return to your application.

  • Invoking the application of a midlet blackberry email client.

    Hi guys, I am trying to invoke the blackberry native E-mail application, trying to do until now I'm able to view email compose screen and the data filled in, but my problem is after he gets invoked from in my application it never get all events, as I can not kick it, the BlackBerry shortcut menu does not appear the menu only one that works is the menu that appears by pressing the keys (trackball).

    All events, including the characters of that type in the body of the message i don't get it.

    Please help me.

    what I have done until now is the following:

     net.rim.device.api.system.Application.getApplication().invokeLater(new Runnable()
                {
                    public void run() {
                        MessageArguments mArgs = new MessageArguments                                          (MessageArguments.ARG_NEW,to,msubject, mbody);
                        Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, mArgs);
    
                    }
                });
    

    with the code above in invokeLater, I even tried without invokeLater but in vain.

    my scenario is a user clicks an option in the menu contextual app Feeback Email application opens and with the preset values user can edit too with his comments.

    Thank you

    JH

    Thanks guys, but now I found the solution for my problem mentioned above.

    the issue was with event management, even if my app was painted with screen e-mail editor events received to my main application screens, so I put control of all handlers on the current active form.

      public boolean checkActiveScreen()
       {
           net.rim.device.api.ui.Screen scr = net.rim.device.api.ui.UiApplication.getUiApplication().getActiveScreen();
           net.rim.device.api.ui.Field f = scr.getFieldWithFocus();
           if(null != f)
           {
               return false;
           }
             if (scr instanceof net.rim.device.api.ui.container.FullScreen)
            {
                return false;
            }
            else if(scr instanceof net.rim.device.api.ui.container.MainScreen)
            {
                return false;
            }
            else if(scr instanceof net.rim.device.api.ui.container.PopupScreen)
            {
                return false;
            }
    
           return true;
       }
    

    If the function above has solved my case.

  • Error trying to invoke BlackBerry native with the rental document map

    Hello

    I am trying to invoke a card native BlackBerry (using the Simulator), on the OS 5.0.  I also try to draw multiple markers location with a rental document.  My code runs successfully, except that I get the following error:

    Thread [net_rim_bb_lbs(182)id=256121856] (Suspended (exception NullPointerException))
        MapRect.intersects(short[]) line: 74
        MapRender.renderLayer(BaseDataSource, Graphics, Maplet, Layer, MapRect, int, int, XYRect, XYRect) line: 331
        MapRender.render(BaseDataSource, RenderListener, Graphics, MapRect, int, int, XYRect, XYRect) line: 483
        BaseMapRenderer.render(BaseDataSource, RenderListener, Graphics, MapRect, MapRect, int, int, int, int, XYRect, XYRect) line: 47
        BaseDataSource.render(RenderListener, Graphics, MapRect, MapRect, int, int, int, int, XYRect, XYRect, Transform) line: 247
        RenderThread.renderImpl(Graphics, MapRect, MapRect, int, int, int, int, XYRect, XYRect) line: 259
        RenderThread.run() line: 346
    

    Once I'm back after the error in debug mode, however, the map is shown correctly and the locations are not displayed correctly.  No one knows what might happen?  Here is my code:

    if (vector != null) {
    
        document = "";
    
        for (int i = 0; i < vector.size(); i++) {
    
            loc = (MyLocationClass) vector.elementAt(i);
    
            document += "";
        }
    
        document += "";
    
        Invoke.invokeApplication(Invoke.APP_TYPE_MAPS,
                new MapsArguments(MapsArguments.ARG_LOCATION_DOCUMENT,
                        document));
    }
    

    Any help would be appreciated. Thank you!

    The Simulator has a lot of questions make the cards properly (at least on my machine).

    It works fine on a real device.

  • How can I call the 'device Email App' with my application

    Hi all

    1. work on the version of BB storm (9500/9530 Simulator) is v4.7.0.75
    2 opportunity BB JDE 4.7
    3. the request is:

    I want to call the 'device Email App' through my application through email-ID.
    How can I do it in a smart way? I mean once I close the email app, should return to my request.

    Thanks in advance
    Ratna

    Have you tried that?

    UiApplication.getUiApplication().invokeLater(new Runnable()
                    {
                        public void run()
                        {
                            Invoke.invokeApplication( Invoke.APP_TYPE_MESSAGES, new MessageArguments(MessageArguments.ARG_NEW,"[email protected]","Test","This is Test"));
                        }
                    });
    

Maybe you are looking for