Create a new populated PIN message

  1. Import the required classes and interfaces.
    import net.rim.blackberry.api.invoke.Invoke;
    import net.rim.blackberry.api.invoke.MessageArguments;
    import net.rim.blackberry.api.mail.Address;
    import net.rim.blackberry.api.mail.Message;
    import net.rim.blackberry.api.mail.PINAddress;
  2. Create and populate a new PIN message.
    Message m = new Message();
    PINAddress pa = new PINAddress("ABCDEF99", "Mark Chapters");
    Address[] addresses = {pa};
    m.addRecipients( net.rim.blackberry.api.mail.Message.RecipientType.TO, 
       addresses );
    m.setContent("A message for you...");
    m.setSubject("PIN message for you");
  3. Invoke Invoke.invokeApplication() with the following parameters:
    • a MessageArguments object that uses the new PIN message.
    Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(m));

Was this information helpful? Send us your comments.