Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
07-22-2008 05:01 AM
Compare the returned integer against the Message.Status constants, if the return value you got equals the Message.Status.TX_DELIVERED then you should be able to procede with your deletion.
07-22-2008 11:23 AM
This returns a bit field that could contain multiple status types. To check for a specific type you can and it (&) with the contsant and compare to 0.
08-27-2008 09:12 AM
You can see an example of this on the last line of code in this sample.
08-27-2008 10:09 AM
I must be missing something. In my tests I get the following for a message delivered to the device.
DEBUG - msg.getStatus() = 2047
DEBUG - Message.Status.RX_RECEIVED = 2047
DEBUG - msg.getStatus() & Message.Status.RX_RECEIVED = 2047
DEBUG - Message.Status.RX_RECEIVING = 4095
DEBUG - msg.getStatus() & Message.Status.RX_RECEIVING = 2047
DEBUG - Message.Status.RX_ERROR = 1
DEBUG - msg.getStatus() & Message.Status.RX_ERROR = 1
So if these were compared to zero then the messge is not received, not receiving and there is no error ??? I must be reading this wrong.
08-27-2008 11:22 AM
The getStatus method actually returns one of the RX or TX values, not a bitmask of combined values (which is where you'd use the & operator).
This means you'll need to use a direct comparison (such as an if or switch case) and compare to the constant values.
Sorry for the mix up.