Start a BlackBerry Messenger chat
Before you begin: Make sure that you
have completed the task,
Register your
application with the BlackBerry Messenger platform, and that the class
that displays the
MyBBMChatScreen screen passes in a reference to the
application's associated
BBMPlatformContext object into the screen's contructor.
Code sample: Starting a BBM Chat
The following code sample assumes that the class that displayed the MyBBMChatScreen has passed a reference to the application's associated BBMPlatformContext object into the MyBBMChatScreen constructor.
import net.rim.blackberry.api.bbm.platform.*;
import net.rim.blackberry.api.bbm.platform.service.*;
public class MyBBMChatScreen extends MainScreen
{
public MyBBMChatScreen(BBMPlatformContext platformContext)
{
platformContext.getUIService().startBBMChat("Let's chat!");
}
}
Next topic: Send a download invitation to a contact
Previous topic: Interacting with contacts