BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 11-16-2008, 06:06 AM   #1 (permalink)
New Member
 
Join Date: Aug 2008
Model: 8100
PIN: N/A
Carrier: SANTEL Russia
Posts: 10
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Open file in file explore programmatically.

Please Login to Remove!

Dear Forum,

I have a problem invoking of the file explore (net_rim_bb_file_explorer) to open file stored on SD card. I cannot pass correct args when creating new application descriptor and file explore application is opened (but it is not open necessary file). For example to open file from the SD card in Browser I can use such code:

Code:
boolean retval = true;

int handle = CodeModuleManager.getModuleHandle("net_rim_bb_browser_daemon");

if (handle <=0 ) 
{
     retval = false;
}
else 
{
     ApplicationDescriptor[] browserDescriptors = CodeModuleManager.getApplicationDescriptors(handle);

     if (browserDescriptors == null ) {
          retval = false;
     }
     else
     {
          if ( browserDescriptors.length <=0 ) 
          {
               retval = false;
          } 
          else 
          {
               String[] args = {"url", "file:///SDCard/60165_s.jpg"};

               ApplicationDescriptor descriptor = new ApplicationDescriptor
               (
                    browserDescriptors[0],
                    "url invocation", args,
                    null, -1, null, -1,
                    ApplicationDescriptor.FLAG_SYSTEM
               );

               try
               {
                    ApplicationManager.
                    getApplicationManager().
                    runApplication(descriptor);
               }
               catch(ApplicationManagerException e)
               {
                    retval = false;
               }
          }
     }
}
Anybody know what args (for browser application it is String[] args = {"url", "file:///SDCard/60165_s.jpg"};) I should to pass to file explore application to open the file.

Thanks in advance.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Cyberdata 011146 VoIP V3 Paging Server Multicast Output Supports 600 Ohm
$462.97
Cyberdata 011146 VoIP V3 Paging Server Multicast Output Supports 600 Ohm pictureNortel Avaya BCM50 R5 5.0 4 Line 4 IP Phone System 2 SIP Gateway NT9T6505E5 VoIP
$795.0
Nortel Avaya BCM50 R5 5.0 4 Line 4 IP Phone System 2 SIP Gateway NT9T6505E5 VoIP pictureEdgewater Networks 4500T4 120-4500T4-01-A VoiP 4-Port T1 Router, NIB, FS
$0.99
Edgewater Networks 4500T4 120-4500T4-01-A VoiP 4-Port T1 Router, NIB, FS picture3COM 3CM3C10402B VoIP phone Includes Stand ( Lot of 5 )
$49.99
3COM 3CM3C10402B VoIP phone Includes Stand ( Lot of 5 ) pictureSHORETEL Shoreline Shoregear 24 SG-24 120/24 (600-1025-25) VOIP VOICE #1
$120.0
SHORETEL Shoreline Shoregear 24 SG-24 120/24 (600-1025-25) VOIP VOICE #1 picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.