Invoke
BBMPlatformSession.setPublic() to set this session
as public so that contacts who are not in your
BlackBerry
Messenger contact list can join.
A confirmation dialog is presented to the user when this method is invoked.

After you confirm that you want to host the session, you must send your web service your PIN and PPID. You can now receive join requests from users looking to
join your session even if they are not one of your
BlackBerry Messenger contacts. The
joinRequestReceived() method in your
BBMPlatformSessionListener implementation is invoked
when a
BBMPlatformIncomingJoinRequest object is received by
your application. You can accept or decline this request by invoking
BBMPlatformIncomingJoinRequest.accept() or
BBMPlatformIncomingJoinRequest.decline(),
respectively.

Code sample: Hosting a public session

The following code sample assumes that the class that displayed the
MyBBMInviteScreen has passed a reference to the
application's associated
BBMPlatformContext object into the
MyBBMInviteScreen constructor.

This code sample also assumes that you have completed the task,
Define a session listener
and named the session listener class,
MySessionListener.