How to enable Profile Boxes using BBM SDK 1.2

In the original version of the BBM SDK it was a real pain for users to have to tweak the settings in order to enable apps to create profile boxes. Version 1.2 of the SDK still requires some work from the user but makes things a little better by allowing you to directly launch to screen where this needs to be edited. The code for doing so is as follows:

UiApplication.getUiApplication().invokeAndWait(new Runnable()
{
public void run()
{
try
{
if(platformContext.getSettingsManager().getSetting( SettingsManager.SETTING_PROFILE_BOX ) == SettingsManager.VALUE_DISABLED)
{
Dialog d = new Dialog(Dialog.D_OK,"In order to enable BBM Profile Boxes please check \"Post recent activities to my profile\" on the next screen", 0, null, 0 );
d.doModal();
platformContext.requestAppSettings();
}
}
catch(Exception e){}
}
});

This code assumes that platformContext is the name of your already created and registered BBMPlatformContext object. This code uses a check so, the user does not see anything if this feature is already enabled. The UiApplication invokeAndWait wrapper is required, as an exception will be thrown if this code is not run on a UI thread. Also note that this code requires v1.2 of the BBM SDK, and therefore version 6.0.1 of BBM.