
http://cmer.uoguelph.ca 7
/**
* Returns an access status message to be displayed to the user.
* @param {String} status The status code.
*/
function getStatusMessage(status)
{
if (status === "user") {
return "You decided not to connect " +
blackberry.app.name + " to BBM";
} else if (status === "rim") {
return blackberry.app.name + " has been banned by
RIM.";
} else if (status === "resetrequired") {
return "A device restart is required to use this
application.";
} else if (status === "nodata") {
return "There was no data coverage. Please try again
when you are in data coverage.";
} else if (status === "temperror") {
return "A temporary error occured. Please try again
in 30 minutes.";
}
}
Now let’s test the application. Re-compile, open the MDS simualtor and load the
application into the simulator. Note: The WebWorks SDK and simulators are extremely
buggy. You’ll likely need to close the simulator and open it again each time you want to
reload the application to avoid errors/crashing.
Once the simulator is loaded, and you have reloaded the application, open it. You’ll see
something a little different this time.
The BlackBerry simulator is now requesting permission for the application to connect to
BBM. Click connect. You’ll notice that the BlackBerry simulator will download an
update for BlackBerry ID. This is normal. Wait until the process completes, then restart
the simulator. Once the simulator is restarted, open the application and initiate the
connection to BBM. You’ll now need to login with a BlackBerry ID to be able to connect
Kommentare zu diesen Handbüchern