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

Adobe AIR Development

Reply
New Contributor
Posts: 9
Registered: ‎01-14-2013
My Device: 9320
My Carrier: Orange PL
Accepted Solution

How to get to the sd card (BB10)?

Hello

I am doing app for BlackBerry 10 (simulator).

How to get to the sd card?

 

var _sdcard:File = File.userDirectory.resolvePath( "/../sdcard2" )

 

var _sdcard:File = File.userDirectory.resolvePath( "/../sdcard" )  ?

 

New Contributor
Posts: 2
Registered: ‎02-06-2013
My Device: BB10 DevAlpha B
My Carrier: T-Mobile

Re: How to get to the sd card (BB10)?

Did you ever find out how to access the BB10 sdcard from AIR?

 

I understand that if using C++, you can access the sdcard mount point using

 

app.sdCardMountPoint()


https://developer.blackberry.com/cascades/reference/bb__filesysteminfo.html

 

but I cannot find anything for AIR.

 

BlackBerry Development Advisor
Posts: 52
Registered: ‎04-01-2011
My Device: Torch, Playbook
My Carrier: Rogers

Re: How to get to the sd card (BB10)?

Hi,

 

you can use this to access the sdcard root folder:

 

var _sdfolder:File = new File("/accounts/1000/removable/sdcard");

 

From there you can point to folders like documents, camera, etc...

 

 

Cheers

---
Paulo Garcia
New Contributor
Posts: 9
Registered: ‎01-14-2013
My Device: 9320
My Carrier: Orange PL

Re: How to get to the sd card (BB10)?

Hi Paulo

Thanks for your help Smiley Happy

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

Re: How to get to the sd card (BB10)?

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.
Found a bug? Report it using Issue Tracker
Highlighted
New Developer
Posts: 31
Registered: ‎08-03-2012
My Device: Alpha C
My Carrier: claro

Re: How to get to the sd card (BB10)?

[ Edited ]

hi. if the SD card is Mode USB. it doesnt work.

try(){
//"file acces To SD card"
}catch(e:Error){
//"let you know to the user that is mode USB"
}


hope Help.