O'Reilly logo

BlackBerry Java Application Development by Bill Foust

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - sending an e-mail from an application

  1. It's time to make this application actually do what it is meant to do—send that email! Add the following code to the sendRequest method in the TimeOff application.
    StringBuffer msgBody = new StringBuffer(); msgBody.append("A new TimeOff application request has been submitted \nFrom:"); msgBody.append(Integer.toHexString(DeviceInfo.getDeviceId())); msgBody.append("\nStarting: "); msgBody.append(DateFormat.getInstance(DateFormat.DATE_DEFAULT). formatLocal(_StartDate.getDate())); msgBody.append("\nEnding: "); msgBody.append(DateFormat.getInstance(DateFormat.DATE_DEFAULT). formatLocal(_EndDate.getDate())); msgBody.append("\nComments: "); msgBody.append(_Comments.getText()); Message newMsg = new ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required