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

Reply
Developer
Posts: 153
Registered: ‎02-01-2009
My Device: Torch, PlayBook and Dev Alpha
My Carrier: SFR

USB OTG: Detect USB mass storage device and mount point

Hi,

 

I wish browse USB mass storage. So I need to detect device and mount point.

 

BlackBerry 10 OS mounts USB devices in : /accounts/1000/removable/

 

So in using QFileSystemWatcher, I'm extect to receive a notification as a mount point is created. But it doesn't work.

 

How can I be notified as a USB storage devices is connected and find the mount point ?

 

Nicolas

 

Retired
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: USB OTG: Detect USB mass storage device and mount point

Hi,

 

Are there any errors in the log? Have a look at this thread: http://supportforums.blackberry.com/t5/Native-Development/QFileSystemWatcher/td-p/2713793

 

Thank you.

--
Rob is no longer associated with BlackBerry.
Developer
Posts: 1,560
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: USB OTG: Detect USB mass storage device and mount point

I'm having trouble detecting a directory change outside of the  /accounts/1000 space.

 

I want to watch a directory in the /usr directory.

 

Is this allow or are we limited to the /accounts/1000 folder?

 

Retired
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: USB OTG: Detect USB mass storage device and mount point

Hi,

 

AFAIK any directory you have read access to you should be able to watch...

 

What are you trying to watch, and what's the result you're seeing?

 

Thank you.

--
Rob is no longer associated with BlackBerry.
Developer
Posts: 153
Registered: ‎02-01-2009
My Device: Torch, PlayBook and Dev Alpha
My Carrier: SFR

Re: USB OTG: Detect USB mass storage device and mount point

I want to detect the new mount points as a USB mass storage device is plugged.

 

The BlackBerry OS create a new folder in the "removable" folder ; then mount the device. Just need to be notified and need to know the new mount point.

Retired
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: USB OTG: Detect USB mass storage device and mount point

Is it not reporting anything?

 

While foregrounded - you could have a 1s timer to check the existence / children...

--
Rob is no longer associated with BlackBerry.
Developer
Posts: 153
Registered: ‎02-01-2009
My Device: Torch, PlayBook and Dev Alpha
My Carrier: SFR

Re: USB OTG: Detect USB mass storage device and mount point

Timer ? Bad solution. And in this case I need to determine if it's a USB folder or other.

 

In the same way, we don't have got api to know the SD card mount point. So the path is hardcoded Smiley Sad

 

Retired
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: USB OTG: Detect USB mass storage device and mount point

Ok . . . You didn't answer my question...

--
Rob is no longer associated with BlackBerry.
Developer
Posts: 153
Registered: ‎02-01-2009
My Device: Torch, PlayBook and Dev Alpha
My Carrier: SFR

Re: USB OTG: Detect USB mass storage device and mount point

Sorry, I have tried to use QFileSystemWatcher but it returns any event.

Retired
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: USB OTG: Detect USB mass storage device and mount point

I've asked the dev team if this class is expected to work.

 

(I see in a parallel thread Martin has commented on this issue too)

--
Rob is no longer associated with BlackBerry.