Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Regular Contributor
Posts: 79
Registered: ‎09-17-2012
My Device: Torch 9800
My Carrier: DiGi
Accepted Solution

OS 6/7 - Detect SD Card

Hello all. Is there anyway to detect if SD Card in the device?

 

 

Currently stuck in checking if user has SD card then save fiies to the SD card and if they don't have SD Card save it to the device.

 

 

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: OS 6/7 - Detect SD Card

Yes, on OS 6 and 7 you can use the blackberry.system.hasCapability function

 

https://developer.blackberry.com/bbos/html5/apis/blackberry.system.html#.hasCapability

 

var hasSDcard = blackberry.system.hasCapability("storage.memorycard");

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Highlighted
Regular Contributor
Posts: 79
Registered: ‎09-17-2012
My Device: Torch 9800
My Carrier: DiGi

Re: OS 6/7 - Detect SD Card

Thank you astanley. Smiley Happy