Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Trusted Contributor
pli
Posts: 174
Registered: 09-04-2011
My Carrier: at&t
Accepted Solution

any API to check if device memory has encryption enabled or not

Hi, expert,

 

as we know, at the blackberry phone, user could turn on the device memory encryption and media card encryption. We just wonder if there is any API to query if encryption is enabled or not. I did some search on the internet and I could not find any related answer on this. Just wonder if  there is any way for this such as testing of reading some particular file.

 

Thanks in advance for your insight on this.

Please use plain text.
Trusted Contributor
pli
Posts: 174
Registered: 09-04-2011
My Carrier: at&t

Re: any API to check if device memory has encryption enabled or not

any one has any suggestions on this?

Please use plain text.
Developer
RexDoug
Posts: 4,649
Registered: 07-21-2008

Re: any API to check if device memory has encryption enabled or not

I'm guessing that you are referring to memory protection when the device is locked?

 

My only suggestion is to catch the exception that is thrown when you try to access the protected memory.

 

We ran into this with an email-related program - once the phone was locked, all memory is protected and access to the email from the store results in an exception.

 

Please use plain text.
Trusted Contributor
pli
Posts: 174
Registered: 09-04-2011
My Carrier: at&t

Re: any API to check if device memory has encryption enabled or not

Thanks a lot, with your suggestion, I found out that I could find out if device encrytion is enabled by creating a new file on the disk (for both device memory and sd card). If file creating is successful, check the file extension, it should have .rem extension if encryption is enabled. If file creation is failed if phone is locked (not always failing), if the error message would be specific error message, it would mean that encryption is enabled as well. However if it is some other error message, it is undertermined here. We would have to wait to make sure file creation could be successful to check.

Please use plain text.
BlackBerry Development Advisor
gbeukeboom
Posts: 818
Registered: 10-16-2009

Re: any API to check if device memory has encryption enabled or not

The PersistentContentListener will also help you to listen for this and better determine if Content Protection has been enabled/disabled and also determine when the device is locked so you can hold off until the device unlocks.

 

Cheers,

Garett Beukeboom
BlackBerry Development Advisor
Developer Zone

--
Think or a great new feature? Find a bug?
Log and track them using the Developer Issue Tracker
Please use plain text.
Trusted Contributor
pli
Posts: 174
Registered: 09-04-2011
My Carrier: at&t

Re: any API to check if device memory has encryption enabled or not

[ Edited ]

Hi, Garett, 

 

thanks a lot for your reply. Your suggestion points me to correct path for how to detect the encryption for the device memory. For the media card encryption, we would still need the file test which I said at my above post.

Please use plain text.