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
Guru I
Xandrex
Posts: 18,400
Registered: ‎07-29-2008
My Device: Z30, Playbook, 9320BES
My Carrier: B&You _ SFR

HOWTO : open a local file using the BlackBerry Browser

Dear all,

as you know, the Media application is able to open most files directly from the user interface :
  • it can use either the media filters : Music, Videos, Ring Tones, Pictures (and Voice Notes for OS 4.3 and higher)
  • it can use the Media Explorer (when in the Media application, open menu >> Explore)


In both cases, should the browser be used (*.txt or *.htm files), it's not the browser that is used but an instance of the browser that is read-only. Depending on the OS version, you may for example not be able to click on links (meaning you can't just copy your bookmarks.html file from MozillaFirefox to your MediaCard to get your bookmarks on the go).

You can easily from the BlackBerry Browser access those files, but it requires you know exactly the URI to that file.

 

  • example 1 : I have a file located on my media card, at the UI location /Media Card/folder 1/t.txt I can open it using the browser by typing the URL file:///SDCard/folder%201/t.txt

  • Example2 : I have a file located on my device memory, at the UI location /Device Memory/home/user/documents/t.txt I can open it using the browser by typing the URL : file:///store/home/user/documents/t.txt

 

caveat applies : the browser does not allow you to browse the content of a local folder, so the URL you type has to point to a file.

 

 

 

More information about URLs can be found in the following developer KB article :

DB-00420 What Is - Supported System.getProperty keys




The search box on top-right of this page is your true friend, and the public Knowledge Base too:
Please use plain text.
Super Contributor
bh1r1th
Posts: 273
Registered: ‎11-23-2010
My Device: 9800 torch
My Carrier: Software Programmer

Re: HOWTO : open a local file using the BlackBerry Browser

hi

how to access media filters

i want media ->pictures path

please tell me the path of media pictures.

 

 

Thanks in advance.

Please use plain text.
Guru I
Xandrex
Posts: 18,400
Registered: ‎07-29-2008
My Device: Z30, Playbook, 9320BES
My Carrier: B&You _ SFR

Re: HOWTO : open a local file using the BlackBerry Browser

the pictures folder on the media card can be accessed at the following URI : file:///SDCard/BlackBerry/pictures/



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
Please use plain text.