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

Native Development


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.


Reply
New Contributor
Posts: 7
Registered: ‎01-22-2013
My Device: BB10 Z30
My Carrier: MTS
Accepted Solution

How to access a file on SD card - Blackberry 10 device

I need to get access (create, write, read) to a file on SD card using Blackberry NDK for Blackberry 10.

 

Perhaps, some prefix should be added to the file path. But which?

 

Thanks.

 

Developer
Posts: 103
Registered: ‎12-31-2012
My Device: Blackberry 9810
My Carrier: Verizon

Re: How to access a file on SD card - Blackberry 10 device

New Contributor
Posts: 7
Registered: ‎01-22-2013
My Device: BB10 Z30
My Carrier: MTS

Re: How to access a file on SD card - Blackberry 10 device

Thanks for pointing to SdCardInfo.

 

I meant to access SD card mounted into the device.

Developer
Posts: 145
Registered: ‎12-23-2012
My Device: BB10 Dev Alpha
My Carrier: wifi

Re: How to access a file on SD card - Blackberry 10 device

I am also intrested in accessing SD card, did you found any solution ?

Forums Advisor III
Posts: 1,432
Registered: ‎02-28-2009
My Device: Torch, Bold, Play Book, and Bluetooth HS-700
My Carrier: BELL

Re: How to access a file on SD card - Blackberry 10 device

When I connect my Z10 to the computer, I open Windows Explorer. I can see the Z10 as two drives. One of them is the phone's internal memory, and the other one is the SD card.  For identifying the card, you will recognize which one Windows mapped when you look at the contents. I am sure you know what you have in your phone.

 

Another way to access the second SD card (the one you optionally added), is to remove the card, and use it in a micro-SD adabtor to a card reader for your PC.

 

Jerry G.
Forums Advisor III
Posts: 1,432
Registered: ‎02-28-2009
My Device: Torch, Bold, Play Book, and Bluetooth HS-700
My Carrier: BELL

Re: How to access a file on SD card - Blackberry 10 device .

When I connect my Z10 to the computer, I open Windows Explorer. I can see the Z10 as two drives. One of them is the phone's internal memory, and the other one is the SD card.  For identifying the card, you will recognize which one Windows mapped when you look at the contents. I am sure you know what you have in your phone.

 

Another way to access the second SD card (the one you optionally added), is to remove the card, and use it in a micro-SD adabtor to a card reader for your PC.

 

Jerry G.
Developer
Posts: 145
Registered: ‎12-23-2012
My Device: BB10 Dev Alpha
My Carrier: wifi

Re: How to access a file on SD card - Blackberry 10 device .

Actually I was more interested in API or Path using which I can access content of SD Card in BB10 Application

 

Is there any know path which I can use in application to access SD card content ?

Developer
Posts: 36
Registered: ‎01-16-2013
My Device: Z10
My Carrier: Telus

Re: How to access a file on SD card - Blackberry 10 device .

I logged into the device using ssh.  You can also open the "System information" perspective, select file navigator.   I see the following in the root  ( / ) directory:


lrwxrwxrwx   1 root      nto              34 Mar 25 12:12 sdcard -> /accounts/1000/shared/misc/android
lrwxrwxrwx   1 root      nto              31 Mar 25 12:12 sdcard2 -> /accounts/1000/removable/sdcard

The directory /sdcard2 seems to be what you want.  Inside it has 1000_shared group permissions.  Directories for books, camera, docs, music, etc.

 

 

Highlighted
Developer
Posts: 145
Registered: ‎12-23-2012
My Device: BB10 Dev Alpha
My Carrier: wifi

Re: How to access a file on SD card - Blackberry 10 device .

Thanks, This is what I was looking for. As I dont have device now, was not able to confirm the path.

BlackBerry Development Advisor
Posts: 15,885
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: How to access a file on SD card - Blackberry 10 device .

Appologies for resurecting an old thread, but I just had to answer this one and this thread is one of the results for a search for this.

 

There is a native C method that returns the SD card path.  See removablemedia_info_get_device_path().

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.