BlackBerry Device Applications Integration Guide
}//end for loop
}//end else if
Notify an application that an email message is about to be sent
1.
Create a class that implements
public class mailSendListener implements SendListener{
2. Create an instance of the subclass.
mailSendListener mailSL = new mailSendListener();
3. In a try block, retrieve the
try {
Store store = Session.waitForDefaultSession().getStore();
}
4. In a catch block, manage a
catch (NoSuchServiceException e) {
System.out.println(e.toString());
}
5. Add a
SendListener
store.addSendListener(mailSL);
Notify an application that an MMS message is about to be sent
1.
Create a class that implements
public class mmsSendListener implements SendListener{
2. Create an instance of the subclass.
mmsSendListener mmsSL = new mmsSendListener();
3. Add a
SendListener
MMS.addSendListener(mmsSL);
Notify an application that an SMS message is about to be sent
1.
Create a class that implements
public class smsSendListener implements SendListener{
2. Create an instance of the subclass.
smsSendListener smsSL = new smsSendListener();
SendListener
3. Add a
SMS.addSendListener(smsSL);
20
}//end if
net.rim.blackberry.api.mail.SendListener
Store
object.
NoSuchServiceException
instance.
net.rim.blackberry.api.mms.SendListener
instance.
net.rim.blackberry.api.sms.SendListener
.
.
.
.
.