Notify An Application That An Email Message Is About To Be Sent; Notify An Application That An Mms Message Is About To Be Sent; Notify An Application That An Sms Message Is About To Be Sent - Blackberry JAVA DEVELOPMENT ENVIRONMENT - - DEVICE APPLICATIONS INTEGRATION - DEVELOPMENT GUIDE Integration Manual

Blackberry device applications integration guide
Table of Contents

Advertisement

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

Advertisement

Table of Contents
loading

This manual is also suitable for:

Java development environment 4.6.0

Table of Contents