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.

Tags: BlackBerry Developers

Similar Questions

  • How do I invoke callIncoming() except make a call

    Hello

    How to call callIncoming() except call?

    Thank you

    on the Simulator, you can simulate incoming calls (alt + i or menu). on a real device: you can not.

  • Smartphones bb curve 8900 blackBerry does not receive calls. Everything else works!

    Hello, just bought a 8900, after a new Reset SIM. Everything worked for about a week, now I can't receive calls. If I call my phone, I get the music while waiting for someone to answer, but the BB don't gives no indication that a call comes, no ring, no screen change, etc.. I drilled down in all profiles and checked for what is obvious. Even taken by an ATT store where they pulled the battery and reinstall the SIM card, but no change. Someone at - it suggestions? The last thing I did before that I noticed this problem is to download a ringtone via my browser and set it so that's what someone means when they call me (before i pickup.) When I call my phone, I get the Lady saying that I can listen to music while I wait for someone to answer. I can hear it even ring through the other phone between a break in music...

    This has been resolved. Had a problem with my account settings, by the Support Center of device...

  • 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.

  • 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

  • make a call?

    Hello

    How to make a call to the blackberry application?

    V midlet used platformRequest (...).

    I need such a feature in field of blackberry...

    PhoneArguments phoneArgs = new PhoneArguments (PhoneArguments.ARG_CALL, number); Invoke.invokeApplication (Invoke.APP_TYPE_PHONE, phoneArgs);

  • Make a call with PhoneArguments

    I use this piece of code to make a call:

    PA PhoneArguments = new PhoneArguments (PhoneArguments.ARG_CALL, ExchangeNumber);
    Invoke.invokeApplication (Invoke.APP_TYPE_PHONE, pa);

    The ExchangeNumber begins with "08" (zero eight) to Stockholm. When the call is placed the number dialed is

    the prefix "1" (one) then it starts with "108".

    Why?

    Hello

    Maybe that not add the code in the country before the area code, is why it is added by default can be the U.S. country code. follow this format:

    + 1-519-888-7465 (country - regional-number code)

  • Sierra of MacOS - Siri cannot make voice calls.

    Hi guys,.

    Siri is supposed to be able to make phone calls via the iPhone, the Mac, in the Sierra de MacOS?

    Cause I can make phone calls (not the Facetime calls) fine if I use the Facetime on Mac app and click on the phone number, I want to call, or if I take a certain number of Contacts. But if I try to open Siri and make a voice command to "call X", he always tries to do through Facetime. Which means he's trying to make a Facetime call instead of a voice call normal.

    Is this a bug or missing feature? Is there a fix or a workaround for it? I wish I could use Siri on my Mac, just as I do on the iPhone.

    I observed the same behavior, so I think it's a missing feature.

    And page (below) which deals with Siri on Mac shows a command "FaceTime", but not a "Call" command  (As I say, I used the "Call" command and observed the same behavior you did.)

    Use Siri on your Mac - Apple Support

  • Impossible to make FaceTime calls on iPhone 7 using Siri

    I tried to use Siri to do a FaceTime call tonight and gave an unusual error: "I wish I could, but FaceTime is configured with me yet."

    I'm able to get Siri to open the FaceTime app, simply cannot access directly from my contacts and apart from this Siri works fine on the iPhone 7, including SMS and regular audio calls.

    I tried a FaceTime using Siri call on 3 old iPhone models (5s, 6 + and 6s), all running iOS 10, and it worked properly on each of them, she was with both iOS 9 and 10 on the same model of 6s for the past year, so this leads me to believe it's a problem iPhone 7 (or an individual defective unit) rather than a problem of iOS 10.

    I checked a number of settings on the iPhone 7 before coming here:

    • Siri is enabled.
    • FaceTime is activated.
    • Restrictions (general-> Restrictions) are completely shut down.
    • iCloud-> contact is activated.

    Hi there jsf23!

    Welcome to Apple Support communities, it's my pleasure to help you with your iPhone 7 issue of Siri is not able to make FaceTime calls.  I use Siri all the time and have his power making FaceTime calls is another great feature.  Looks like you have checked a lot of things I want to check too, if I fell on the same subject.

    At any time, that there is a problem with Siri or FaceTime, the first thing I recommend is to restart the iPhone and retest Siri and FaceTime.

    Restart your iPhone, iPad or iPod touch

    If Siri is still underway on issues from a FaceTime call, try to perform a reboot of the force.  Remember, this will be a little different on an iPhone 7.

    • On an iPhone 7 or iPhone 7 more: press and hold the sleep/wake and Volume buttons down for at least ten seconds, until you see the Apple logo.

    Test again and then try to check for updates.

    Update the software on your iPhone, iPad or iPod touch iOS

    Have a great day!

  • SBH52 don't make phone calls after the installation of Marshmallow

    Hello

    I upgraded my Z3C Marshmallow Android and since then, the SBH52 does not allow me to make phone calls from the call log.

    I had similar behavior original lollipop but discovered "Call Log Smart Extras" had to be installed and the problem solved.

    However, after upgrading to the marshmallow and noting that I couldn't dial from the SBH52, I uninstalled and reinstalled Smart Connect, SBH52 app and Call Log Smart Extras but everything remains the same. I also tried disconnection and reconnection of the headset to the phone, both via NFC and Bluetooth.

    The headset works. I can 'throw' music, audio, videos and maintain telephone conversations. I can also access the call log and read SMS.

    If I want to hang up, I can still do it by pressing the big round button on the front of the helmet, so my problem is not this one:

    http://talk.sonymobile.com/T5/wireless-accessories/SBH-52-on-Android-6/m-p/1051004#M7193

    Everyone found this problem too? Is there a solution?

    Thank you.

    I wonder there was an update for applications, but resumed making phonecalls through SBH52

  • Z3 double speaker is on when I make a call

    The speaker is on when I make a call. I have to press the speaker icon to stop him so no one can hear the conversation.
    No idea how to make calls without going through the speaker. ?

    Found.
    I have a SONY SWR50 and installed the application "speaker of wear". By just uninstall the app, everything returned to normal.
    It was a bad setting or the app created a kind of conflict.
    Thank you.

  • How to make a call from CPO to vCO (vcenter orchestrator)?

    How to make a call from CPO to vCO (vcenter orchestrator)?

    Hello

    I am trying to create a workflow that would connect to a vCO.

    I was Expecting

    1. how to create targets for the vCO and

    2. how acess that target.

    Concerning

    Shiva

    1) there is no target for the vCO. We have a target/connection to Virtual Center (vCenter)

    (2) If you want to make vCO calls you could do, it all depends on how the API is structured. You can make calls via web services or CLI, etc.

    If you give your use case it is perhaps more to discuss. If you need an ENH or put something in, you can open a case with the TAC.

  • to make a call in a different way

    Normally when you place a call I did like this:

    Pa = PhoneArguments

    new PhoneArguments (PhoneArguments.ARG_CALL, newNumber) ;

    Invoke.invokeApplication (Invoke.APP_TYPE_PHONE, pa);

    What I wonder if it is possible to call the phone first and then send dtmf rather tones?

    Yes, you can call the application phone to phone and then inject the call of DTMF tones.  After invoking the phone application to dial a number using the Phone.getActiveCall () method to get an instance of phone call, then use it to call the methods sendDTMFTone (s).

  • BlackBerry Smartphones unable to make / take calls on my BB Torch 9800

    Hi all

    I am facing a weird problem with my phone today. I'm unable to make any calls or take calls on my phone.

    When I call someone the call is connected to the other person but on speaker phone only and the person does not hear me.

    When someone tries to call me, I am unable to take the call. I tried everything I can think but cannot take the call. Even hands-free is not helping here.

    All other functions are fine. all keys work correctly. I am facing problem and take calls. Kindly help me out here. what I'll do.

    Hello and welcome to the community!

    Each time a random strange behavior or slow creeps, the first thing to do is a battery pop reboot. With power ON, remove the hood back and remove the battery. Wait a minute, then replace the battery and cover. Power on and wait patiently through the long reboot - about 5 minutes. See if things return to functioning. Like all computing devices, BB suffers from memory leaks and others... with a hard reboot is the best remedy.

    Best!

  • SOLVED blackBerry smartphones - cannot make outgoing calls. Get two beeps like busy tone with the Koodo Mobile in Thunder Bay, Ontario North

    This has caused me a lot of frustration.

    With my curve when I try to make an outgoing call and I get a busy signal as two beeps repeating themselves.

    I tried everything and the only thing that worked was a security wipe, so losing all my data.

    If I made a backup and restore, the problem comes back. If I restored it selectively through desktop BLackberry, database of the database, the problem returns. Koodo Mobile and Blackberry escalated support was not able to understand this.

    However, through much trial and error, I found that if I limit my identity or turn off the option to show my number in the phone settings, for some reason any he caused this problem.

    So I can't block my identity by using the settings on the phone.

    This can be the result of my location service and the carrier, which is Koodo mobile, in Thunder Bay in Northwestern Ontario that used the TBAYTEL towers for the service, the type of signals technology service. I don't know, and no one was able to tell me why this is happening. I went to 6 months not being able to make outgoing calls without losing ALL my sms, contacts, BBM, TXTs, bookmarks and other personal data. Only a security wipe would allow me to make a call - until I have activate the restrict my identity and activated the show my number option.

    SO - I hope this helps other users. I've been through three phones, thinking that it was the material problems.

    It's a kind of crappeh because I would not block my identity with a few calls. So with the curve BB on Koodo to Thunder Bay, I can't do that. I have not tried outside the Northwestern ONtario, but it will probably be the same, unless I am out of service TBAYTEL area.

    Such is life. Live with it.

    Difficulty easy but unsatisfactory.

    I ' lll this post in the Forum of Koodo so when one exists.

    See you soon!

    I did these steps including restore each database one at a time with the same results. I can do a full restore and the remains of the issue until I set restrict my identity forever AND Show My Number Yes. I also did all of these steps with the any other BB Curve 8530 and it seems to happen every ih in this area.

    I found the work around but it would be good to know why and if this happens outside the TBAYTEL towers that Koodo Mobile uses throughout Northern Ontario to the Ontario-Manitoba border in the West, to the North of Hearst and East of Sault Ste. Marie.

    If there are a Koodo Mobile, users who have a BlackBerry Curve 8530, I'd like to hear you just what I see if it is unique to the service provider, hardware, software and network type, geographical location, etc.

    Any comment is appreciated, as support Koodo and BlackBerry have been baffled and couldn't solve this problem and I hope that others find it so that they can save months of time and frustration, I have lived.

    See you soon...

Maybe you are looking for