Invoke.APP_TYPE_MESSAGES problem?

Hi all

We have Invoke.APP_TYPE_MESSAGES in our application as follows:

Invoke.invokeApplication (Invoke.APP_TYPE_MESSAGES,

new MessageArguments (MessageArguments.ARG_NEW,[email protected], "",""));

what application calls this the screen open code,

There is more than one 'To' s present. one with [email protected] and the other empty.

Like this.

To: [email protected]

TO:

CC:

Object:

.............................................

..............................................body etc.

Why is there more than one team of specialists.

I would like to relieve one from the screen.

How can I do that. ?

anyone has an idea about this.

Please, I beg you.

Thank you best regards &,.

Narendra.

Message message = new Message();

                try{
                    Address address  = new Address("[email protected]","customer service");
                    Address[] addressArr = new Address[1];
                    addressArr[0] = address;
                    message.addRecipients(Message.RecipientType.TO,addressArr);
                }catch(Exception ae){
                    ae.printStackTrace();
                }

                Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES,
                    new MessageArguments(message));

Tags: BlackBerry Developers

Similar Questions

  • Invoke a problems of default browser with the code 4.5 session

    Hello, I uses this simple code to create an icon on the desktop, and then point to an internal URL by invoking the browser of BES.

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/796557/800332/800440/...

    This worked great until that code 4.5. Now with Blackberry unit installed on a device 4.5 the default browser to browser unit.

    Any ideas?

    problem solved-

    http://www.BlackBerry.com/BTSC/articles/529/KB15695_f.SAL_Public.html

     

  • Problem with invoking the Application Messages

    Hello

    I'm testing an application that adds an element of application menu in the list of messages and when clicked, displays just the old content and beneficiaries on the screen 'Compose Email'.

    That's what I did.

    public Object run(Object in_objContext)
    {
       if(in_objContext instanceof Message)
       {
        Message msgOrig = (Message)in_objContext;
        try
        {
            Message msgNew = msgOrig.reply(true,true);
    
            Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES,
                new MessageArguments(msgNew));
    
        }catch(Exception e){}
       }
       return null;
    }
    

    The problem is, there is no "Send" command in the context menu.

    Can someone help me?

    I can confirm that, but you're probably referring to my post on the other forum anyway.

    What you will find (if the memories are good) is that a message created with the Message.reply () function object doesn't have a 'Send' menu item when the envoys to the Messages app.

    However, I think you will find that the method of 'memory' works.

    What we ended up doing are creating our own processing of the Message object to generate a response object.

  • Problem using Invoke.invoke from a non - UI Application

    Hello

    I have an application that displays a PopupScreen that consumes only part of the screen. Currently, I designed the application as an "Application" vs. "UiApplication" so I do not see the ugly white screen of death. I pushed my screen as a Global fine screen.

    The problem is that now I want to use the API call to open a new message to a destination. When I call:

    Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(tm));
    

    where "tm" implements javax.wireless.messaging.TextMessage.

    The problem is that I get a ClassCastException because the Invoke API attempts to call getUiApplication.

    Thread [project(125)id=1035919360] (Suspended (exception ClassCastException))     UiApplication.getUiApplication() line: 474    SMSEditorScreen(ModelScreen).go(boolean) line: 460    SMSEditorScreen(ModelScreen).go() line: 454   SMSEditorScreen.run() line: 739   SMSEditorScreen.runEditor(Object, SMSModel) line: 563     SMSComposeVerb.runEditor(ContextObject, SMSModel) line: 213   SMSComposeVerb.doInvoke(Object) line: 174     SMSComposeVerb(ShowMessageAppVerb).invoke(Object) line: 76    Invoke.invokeVerb(Verb, Object) line: 733     Invoke.invokeApplication(int, ApplicationArguments) line: 413
    

    Is it possible that I can make my application a UiApplication consuming part of the screen without a white background or work around the problem otherwise?

    You can do so by extending UiApplication.  When your application starts, have it call Application.requestBackground to move it to the bottom before you push your popup screen.  This avoids the white background.  You can also override Application.acceptsForeground to return false, prevent your application to appear in the Chooser of the task.

    It should also use the invoke class.

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

  • Problem when using pushGlobalScreen

    Hello everyone,

    In my application, I screen using the pushGlobalScreen () method.

    on this screen, I try to call the default mailClient using the following code snippet.

    Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES,
                                    new MessageArguments(MessageArguments.ARG_NEW));
    

    I'm able to invoke the mailClient, but this called screen goes below my screen
    (Because my screen is global).

    so my question is how to screen (new post) screen above this overall screen?

    Is there a work around that?

    Thanks in advance.

    If your application is in the background and you want to show your application screen above browser multimedia, so you can ask your foreground application using requestforeground() and then you can push your screen.

    Press the button Bravo thank the user who has helped you.

    If your problem has been resolved then please mark the thread as "accepted Solution".

  • e-mail of a Midlet BB customer access problem

    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

    Committed response.

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=appworld_dev&message.ID=997#M997

  • Login message problem

    Hello

    I use Message connection to send an sms through my application but it wqwill launch native

    MessageConnection _mc = (MessageConnection) connector
    . Open("SMS://:0");

    If (_mc! = null) {}
    define a listener to trap outgoing sms
    messages
    _mc.setMessageListener (ContactsScreen.This);
                                
    TextMessage, textMessage = (text) _mc
    .newMessage (MessageConnection.TEXT_MESSAGE);
    textMessage.setAddress("sms://"get_phone_number());)
    textMessage.setPayloadText ("bcm");

    () Invoke.invokeApplication
    Invoke.APP_TYPE_MESSAGES,
    new MessageArguments (textMessage));

    }

    but he NPO app sms just once... What is the problem with the above code...

    you close the connection after use? This is probably the question.

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

  • out after an invoke application works on 4.5 but not on 5.0

    After having invoked an email like this:

    if (tmpStr.trim().length() == 0)

    return;

    tmpStr = tmpStr.trim();

    MessageArguments msg = new MessageArguments(MessageArguments.ARG_NEW,tmpStr/*to*/,null,null);

    Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES,msg);

    The e-mail application launching. However, if I try to close the application and by throwing the email etc... it fails and the application crashes until an exception is thrown. Something like process does not.

    This only happens on a 4.7 - 5.0 OS. I developed my app for 4.5 think BB would be backward compatible.

    My app works perfectly on 4.5 but crashes on 4.7 to 5.0.

    Any ideas would be greatly appreciated.

    It's the solution

  • Invoke the Message MMS existing message no new message

    I created a Message with attachments and invoked the message request to create an email, now it would be nice to add a line of code to call MMS message.

    This calls for an email with my Message

    Invoke.invokeApplication (Invoke.APP_TYPE_MESSAGES, new MessageArguments (message));

    This calls for a new MMS.

    Invoke.invokeApplication (Invoke.APP_TYPE_MESSAGES, new MessageArguments (MessageArguments.ARG_NEW_MMS));

    It does not work

    Invoke.invokeApplication (Invoke.APP_TYPE_MESSAGES, new MessageArguments (message, MessageArguments.ARG_NEW_MMS));

    I can invoke the application message and create a new MMS message, but I don't see how to create a multimedia Message and the message I created.

    If anyone has any ideas, you could save me a lot of time.

    Thank you!

    Somehow, I missed the answer to this one.  It has already been posted.

    It is not possible!

  • Adding listener problem after sending the Mail

    Hi all

    I have to add listener after sent mail because I tested a service when the mail will be sent.

    Help, please!

    Its Urgent...

    Thank you!

    Copy the following code

    Message m = new Message();
    
            long millis = System.currentTimeMillis();
            Date d = new Date(millis);
    
            m.setSentDate(d);
    
                Address a = null;
            try{
                        a = new Address(_dto.get_email(), _dto.get_fname() + " "
                                + _dto.get_lname());
    
                    } catch (AddressException e) {
    
                        e.printStackTrace();
                    }
                }
            }
    
            try {
    
                m.addRecipients(
                        net.rim.blackberry.api.mail.Message.RecipientType.TO,
                        addresses);
            } catch (MessagingException e) {
    
                e.printStackTrace();
            }
            try {
                m.setContent("\n\n\nbody");
    
                m.addMessageListener(new MessageListener() {
    
                    public void changed(MessageEvent e) {
    /////// here you can check the messageevent instance and check the code //of the event
    
    if (e.getMessage().getStatus() == Message.Status.TX_DELIVERED
                                    || e.getMessage().getStatus() == Message.Status.TX_SENT) {
                                //Message Sent
    
                            } else if (e.getMessage().getStatus() == Message.Status.TX_ERROR
                                    || e.getMessage().getStatus() == Message.Status.TX_GENERAL_FAILURE) {
                                //Message failed
    
                            } else
    //Pending
    
    }
    
    } catch (MessagingException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES,
                    new MessageArguments(m));
    
  • Invoke the mail to send the html page, as in the body of the email

    Hi all

    Please can I know how to do the html code to display as such in the mail application before sending

    I use this method to call the application

    Invoke.invokeApplication (Invoke.APP_TYPE_MESSAGES, new MessageArguments (MessageArguments.ARG_NEW, to, subject, body));

    Here the body is contained html of the page

    but this isn't poster in html format in the veiw can all help

    Sending HTML emails programmatically is not currently supported. Only the plain text.

  • A Contact button

    Hello

    I made a contact us button to send feedback by writing to us. But mail is sent in the background without showing the e-mail screen.

    All advice will be a great help!

    ...

    Download the mail by default Session store.

    Store is Session.getDefaultInstance () .getStore ();.

    retrieve the sent folder

    Records file [] = store.list (Folder.SENT);

    Folder sentfolder = files [0];

    Create a new message and store it in the sent folder

    Message msg = new Message (sentfolder);

    Address [] recipients = new address [1];

    try {}

    beneficiaries [0] = new address ("[email protected]", "[email protected]");

    Add the list of recipients to the message

    msg.addRecipients (Message.RecipientType.TO, beneficiaries);

    the value of an object to the message

    msg.setSubject ("I have a problem");

    sets the body of the message

    msg.setContent ("Initial Device Info :");

    sets the priority

    msg.setPriority (Message.Priority.HIGH);

    Send the message

    Transport.Send (MSG);

    A session = Session.getDefaultInstance ();

    Transport transport = session.getTransport ();

    transport. Send (MSG);

    } catch (Exception me) {}

    System.Err.println (me);

    }

    Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(m));
    

    use it in case you want to call the native application for email

  • setPayloadText resulting in the body of the text message empty on some BlackBerry.

    I'm having a problem, who would say that maybe it's a bug of the BONE, where I use Invoke to allow the user to send data in an SMS text message and some users report cases that it works very well, but in others, that the text of the payload is did not in the messages app.

    Here is my code:

    private void sendAsSMS(){
            MessageConnection smsMC = null;
            try {
                smsMC = (MessageConnection)Connector.open("sms://");
            } catch (IOException e) {
                Dialog.alert("IOException thrown in sendAsSMS(): " + e);
                e.printStackTrace();
            }
            TextMessage message = (TextMessage)smsMC.newMessage( MessageConnection.TEXT_MESSAGE );
            message.setPayloadText(noteArea.toString());
            message.setAddress("sms://");
            Invoke.invokeApplication( Invoke.APP_TYPE_MESSAGES, new MessageArguments(message) );
        }
    

    For example, it works very well on my Storm2 9550 running 5.0.0.1082, but the Simulator Storm2 running 5.0.0.535 supplied with the plug-in in eclipse for the api 5.0 has the issue of empty text of payload.

    I wonder if this is something that someone else has met and if there is a work around known for this?  There may be an error in my code?

    Thank you in advance for any input!

    Russ.

    Known issue. You must use the EventInjector to move it. Do some research, I have come across this before, and I found a good thread that has talked about this. There should be something in the incident handler.

Maybe you are looking for