How to open the file? Many types of files, check the type and call app to open it.

HI.everyone.

I am doing a project like dropbox.

The problem is:

server-side has several files of different types.

such as: word, excel, file, file pdf image and so on.

After the file is downloaded.

How do I know what app is the type of file.

and call this app to open the file?

I can get the file type of the file name extension.

But I do not know how to find the application that can open this file.

or if this device have any application can open the file. Then, it will show you an alter.

like dropbox app.

Please help me.

Thank you very much.

Hello

For above 4.3 and higher, you can use API call to achieve this. In regards to my understanding, it works as follows (Please correct if I am wrong).

-All files (PDF, excel etc) readers save with BONE graft as "I am able to open the file whose mime the type XXX.

- So, when you pass the path to the API Invocation, it searches for reader app there is place and request that you open the file. (I know not if more a reader installed in the device that achieved reference)

Here's the code that worked for me,

Invocation invocation = new  Invocation();
invocation.setAction(ContentHandler.ACTION_OPEN);
Registry registry = Registry.getRegistry("");
registry.invoke(invocation);

If none of the application saved in the requested file format it then throws the exception.

Another option is to pass the path to the browser by using the private API to display the files...

Let me know if it works for you...

Thank you

Tags: BlackBerry Developers

Similar Questions

  • How to freeze the layers and block them so that they do not appear when you open the file?

    How to freeze the layers and block them so that they do not appear when you open the file?

    You can set the Initial State of the layers as hidden.

    The game, 18:09, kathya97643775, [email protected], 8 October 2015 >

  • How do you the bookmarks and history buttrons open boxes in Firefox 33?

    How I make the bookmarks and history buttons open their respective boxes instead of having to use the submenu stupid button on the sidebar?

    Apparently, the Restorer of classic theme worked for Firefox 29, but it does not work for 33:
    https://support.Mozilla.org/en-us/questions/991080

    There are two sets of buttons of toolbar tools for history and bookmarks in the palette to customize with the CTR extension installed. You need those without drop marker to open the sidebar.

  • How to read the date and time of a file by labview information

    How to read the date and time of a file by labview information? for example, time created and updated time.

    The similar question had already spoken here (this is the old thread but still seems topical):

    http://forums.NI.com/T5/LabVIEW/file-date-created/TD-p/109836

  • How to record the numbers and words in the same file

    Hello:

    I did a vi where I record the spectrum and its integration in different positions of a two-dimensional net. I save the information in two spreadsheet with the comand "write to file measure."

    Now, I am recording the parameters initial positions, end X X and space between measurement points. I want a file with two columns that looks like:

    Initial position X 1000

    final position X 2000

    space 100

    But idon't know how to save the words and numbers in the same file.

    As I have to perform several steps I want to automatically choose the name of the file (something like parameters_1, parameters_2...)

    Thank you for your attention

    Hi bitxor.

    You can use all the functions of the WriteTotext file to write strings to a file.

    Then you could set up WriteToMeasurementFile' to add new data to existing files (instead of overwrite or renaming)...

    BTW. It is not a good idea to mix lvm files containing arbitrary spreadsheet data!

  • How to calculate the second and minisecond for audio landmark

    I'm doing a sound synchronization for the clip audio and video in Flash. I found a tutorial on the web, and it seems to work. However, I do not know how to calculate the second and the mini (deuxieme from mp3 file. The first frame has the following lines to set the duration for each animation:
    Import class
    Import net.quip.sound.SoundSync;

    Stop the main timeline
    Stop();

    Create an instance of SoundSync
    var ss:SoundSync = new SoundSync();

    ss.addCuePoint ("IT", 20100);
    ss.addCuePoint ("admin", 20000);
    ss.addCuePoint ("maintenance", 19800);
    ss.addCuePoint ("treatment", 16479);
    ss.addCuePoint ("engineering", 14598);
    as.addCuePoint ("logo_epa_npdes", 12356);
    ss.addCuePoint ("construction", 8967);
    ss.addCuePoint ("370 mg/j", 7896);
    ss.addCuePoint ("mc_650, 000 ', 5439);
    ss.addCuePoint ("130 mg/j", 3254);
    ss.addCuePoint ("1938", 2439);
    ss.addCuePoint ("vintage_mc", 0);

    Use the instance of loading external MP3
    ss.loadSound ("Scn04 - 05.mp3", true);

    Create a listener object for the
    cuePoint and onSoundComplete events
    var listener: Object = new Object();
    listener.cuePoint = function (): Void {}
    Play();
    }
    listener.onSoundComplete = function (): Void {}
    Play();
    }
    ss.addEventListener ("cuePoint", listener);
    ss.addEventListener ("onSoundComplete", listener);

    and the soundsync.as file as follows:
    Import mx.events.EventDispatcher;
    Import mx.utils.Delegate;
    class net.quip.sound.SoundSync extends its {}
    PROPERTIES
    private var _cuePoints:Array;
    private var _currentCuePoint:Number;
    private var _interval:Number;
    private var _intervalDuration:Number;
    private var _secondOffset:Number;
    Event dispatcher
    public var dispatchEvent:Function;
    public var addEventListener:Function;
    private var removeEventListener:Function;
    CONSTRUCTOR
    public void SoundSync(target:MovieClip) {}
    Super (target);
    init();
    }
    METHODS
    private function init (): Void {}
    Initialize properties
    _cuePoints = new Array();
    _currentCuePoint = 0;
    _intervalDuration = 200;
    _secondOffset = 0;
    Initialize the instance of the class as the valid event broadcaster
    EventDispatcher.initialize (this);
    }
    Add Cue Point
    public void addCuePoint(cuePointName:String,_cuePointTime:Number):Void {}
    () _cuePoints.push
    {
    type: "cuePoint",.
    name: cuePointName,.
    time: cuePointTime,.
    target: this
    }
    );
    _cuePoints.sortOn ("time", Array.NUMERIC);
    }
    Get cue point
    public void getCuePoint(nameOrTime:Object):Object {}
    var counter: Number = 0;
    While (counter < _cuePoints.length) {}
    If (typeof (nameOrTime) == 'string') {}
    If (_cuePoints [meter] .name == nameOrTime) {}
    return _cuePoints [counter];
    }
    } Else if (typeof (nameOrTime) == 'number') {}
    If (_cuePoints [meter] .time == nameOrTime) {}
    return _cuePoints [counter];
    }
    }
    counter ++;
    }
    Returns a null value.
    }
    Get the Index of the current Cue Point
    private void getCurrentCuePointIndex(cuePoint:Object):Number {}
    var counter: Number = 0;
    While (counter < _cuePoints.length) {}
    If (_cuePoints [meter] .name == cuePoint.name) {}
    return the meter;
    }
    counter ++;
    }
    Returns a null value.
    }
    Get the next Cue Point index
    private void getNextCuePointIndex(seconds:Number):Number {}
    seconds (seconds) =? seconds: 0;
    var counter: Number = 0;
    While (counter < _cuePoints.length) {}
    If (_cuePoints [meter] .time > = seconds * 1000) {}
    return the meter;
    }
    counter ++;
    }
    Returns a null value.
    }
    Benchmark deleted
    public void removeCuePoint(cuePoint:Object):Void {}
    _cuePoints.splice (getCurrentCuePointIndex (cuePoint), 1);
    }
    Remove all Cue Points
    public function removeAll_cuePoints (): Void {}
    _cuePoints = new Array();
    }
    Beginning
    public void start(secondOffset:Number,_loops:Number):Void {}
    Super.Start (secondOffset, loops);
    dispatchEvent ({type: "onStart", target: this});
    Reset benchmark
    _secondOffset = secondOffset;
    _currentCuePoint = getNextCuePointIndex (secondOffset);
    Poll for cue points
    clearInterval (_interval);
    _interval = setInterval (Delegate.create (this, pollCuePoints), _intervalDuration);
    }
    Load sound
    public void loadSound(url:String,_isStreaming:Boolean):Void {}
    super.loadSound (url, isStreaming);
    clearInterval (_interval);
    _interval = setInterval (Delegate.create (this, pollCuePoints), _intervalDuration);
    }
    Stop
    public void stop(linkageID:String):Void {}
    If {(linkageID)
    Super.Stop (linkageID);
    } else {}
    Super.Stop ();
    }
    dispatchEvent ({type: "onStop", target: this});
    Kill the ballot
    clearInterval (_interval);
    }
    Survey benchmarks
    private function pollCuePoints (): Void {}
    If the current position is close to the cue point.
    var time: Number = _cuePoints [_currentCuePoint] .time;
    var span: Number = (_cuePoints [_currentCuePoint + 1] .time)? _cuePoints [_currentCuePoint + 1] .time: time + _intervalDuration * 2;
    If (position > = time & & position < = span) {}
    Send event
    dispatchEvent (_cuePoints [_currentCuePoint]);
    Advance to the next landmark...
    If (_currentCuePoint < _cuePoints.length) {}
    _currentCuePoint ++;
    } else {}
    _currentCuePoint = getNextCuePointIndex (_secondOffset);
    }
    }
    }
    EVENT HANDLERS
    onSoundComplete
    public function onSoundComplete (): Void {}
    Kill the ballot
    clearInterval (_interval);
    Reset benchmark
    _currentCuePoint = 0;
    Send event
    dispatchEvent ({type: "onSoundComplete", target: this});
    }
    }

    any help will be greatly appreciated.

    Wuzhishan,

    > Hi Dave, your tutorial is very cute and it is very useful.

    Thank you! My daughter is cute. She inherited all of
    me, so I have not left. ;)

    > I'm sorry that I don't have my question clearly.

    No worries. :)

    > I have listen mp3 in Windows Media Player and try to
    > get both for the tail, I found it on the bottom of the
    > player time indicates 00:26.

    I'm with you.

    > How can I writer this number in the code? Is it 0026 or 26?

    The code expects milliseconds, then 26 seconds would be written as
    this:

    26000

    If he said 01:22 (one minute and 22 seconds), you must write it like this:

    82000

    ... which is 60 seconds for now, 22 seconds
    side, then multiplied by 1,000 to get milliseconds.

    David Stiller
    Adobe Community Expert
    Dev blog, http://www.quip.net/blog/
    "Luck is the residue of good design."

  • How to use the capture and the print button

    I tried to figure out how to use the capture and the "print" button, or add or what you call. I press it and the whole page of a different color changes, so I try to cut the section I want but I don't know how to send it to the printer. Can someone help me with this. I'm not at savvy with tech stuff, but when I find a recipe or something and it doesn't have an option to print a certain area, I can't understand how to use it?

    Thank you

    Andi Starbuck

    That happens to me is, I click and drag to make a rectangle of yellow selection, and as soon as I raise my finger on the mouse button, the part I've selected is captured as an image, a new tab opens and preview before printing, the image display. I can use the installation of the Page or simply print. But if I close the preview, this temporary image vanishes and I'm back on the page where I started. You see something different?

  • How to store the original and to remove some duplicate songs in iTunes on a PC Win7, which took place after iTunes to scan for music during a re - install?

    How to store the original and to remove some duplicate songs in iTunes on a PC Win7, which took place after iTunes to scan for music during a re - install?

    I recently had to format my hard drive and reinstall iTunes 12.3.2.35 on my Win7 PC. As part of the re - install iTunes, I clicked on the button scan for music.  This has created duplicates several of my songs.  I deleted then the duplicate songs from iTunes, but when I went to play a few songs a pop-up said "the song would not be because the original could not be found.  You want to locate? "When I tried to locate the song it is not found, but when I pulled the songs out of the trash they could be found.

    How can I keep the original and remove any duplicate songs in iTunes on PC Win7 which took place after iTunes to scan for music during a re - install?

    iTunes can create duplicates if the same content is added several times from outside the media folder when it is about to make copies of everything that is added to the library, or is added from an external drive that hosts the press kit that was disconnected during the launch of iTunes.

    Official notice of Apple on the duplicates is here: find and remove duplicates in your iTunes library. This is a manual process and article fails to explain some of the potential pitfalls such as the lost coast and membership of playlist, or sometimes the same file can be represented by multiple entries in the library as well as a removal and recycling the file will break all the others.

    Use MAJ > display > show items to reproduce exactly to display the duplicates because it is normally a selection more useful. You must manually select all but one of each group to remove. Sort the list by Date added can make easier select appropriate tracks, but it works better when executed immediately after the dupes were created.  If you have several entries in iTunes connected to a same file on the disk hard then don't not send to trash.

    Use my DeDuper script (Windows only) If you are not sure, do not want to do it by hand, or want to maintain ratings, play counts and playlist membership. See this background thread , this post for detailed instructions and Please take note of the warning to back up your library before deduping.

    (If you don't see the menu bar press ALT to temporarily view or CTRL + B to keep displayed.)

    The latest version of the script can put away the dead links as long as there is at least a double live to merge his stats and membership of the playlist and must deal wisely when the same file has been added through multiple paths.

    TT2

  • How to set the position and size of the façade using the FPRunTimePosRunCustom method in a c# application?

    How to set the position and size of the façade using the FPRunTimePosRunCustom method in a c# application?

    I found a solution! -Set the size and position of the façade with the help of the

    File > VI properties > window running Position (in category list) > custom (in position of menu drop-down).

    then just accept the current position and size (leave the boxes checked) or set values you want directly (uncheck the boxes and fill in the numbers), or physically position and size the façade and use, the "set to current location" button and press "set size" current All that is easier for you.

    OK so it does not make use of the method VI Methods (Active X) FPRunTimePosRunCustom ([Position], [Size]) but if labview want to make him difficult to use then other means must be found.

  • How to set the Date and time on a remote target in Measurement &amp; Automation Explorer (MAX)?

    Hello

    I'm trying to follow the steps described in the following link:

    How to set the Date and time on a remote target in Measurement & Automation Explorer (MAX)?

    It is said

    The software on the target currently supports only the time zoneand deletes the old files?

    I need set the date and time

    and remove all the old unwanted files

    the calendar was gray does not allow me to change the current date.

    Anyone know how to change

    Hi all!

    According to this the below Knowledge Base article, Remote Configuration System Support must be installed on the target for time settings to change in MAX.

    http://digital.NI.com/public.nsf/allkb/FAB0EC4D6E5EE0F386257738005733A3?OpenDocument&MeTC=max_MAXDat...

    If you don't know what version of the system supported remote Configuration software that you have installed on your device target, it is likely that it is not yet installed. Add this software by clicking below your target to the MAX software option and selecting "Add/Remove Software". This is where you will install the System Configuration Remote Support software.

    Please let us know if you have any questions!

  • How to change the typo and misspelled faults in my PDF?

    How to change the typo and misspelled faults in my PDF?

    Hi Gerald,

    You can download a free trial of 30 days from the following link: https://helpx.adobe.com/acrobat/kb/acrobat-downloads.html

    Regarding the pdf edition is concerned, you can click on the "Edit pdf" option on the right pane and easily edit the text in the pdf file. For more details, please visit: https://helpx.adobe.com/acrobat/using/edit-text-pdfs.html

    Kind regards
    Rahul Tyagi

  • I downloaded a free trial of Adobe Creative cloud and dreamweaver CC. I am not able to download a .psd to see how to extract the HTML and CSS.

    I downloaded a free trial of Adobe Creative cloud and dreamweaver CC. I am not able to download a .psd to see how to extract the HTML and CSS.

    Download button is disabled. What is the case for a free trial?

    Hey girijamg,

    I asked that you try to open a page because snippet Panel will be disabled until there is a html page is open in DW.

    Excerpt from Panel will be ready for the job that after any html page is open in DW.

    Hope it makes sense.

    Lalita

  • How to convert PDF files to Word, Excel and other formats, and how I got it.

    How to convert PDF files to Word, Excel and other formats, and how I got it.

    Hi convert PDFs to word,

    You can use the ExportPDF online service to convert PDF files in several formats, including Word and Excel. Once you have converted the files, they will be stored in your online account, and you can download them here.

    Best,

    Sara

  • How to get the phone and messages back in my dock apps? And for some reason, I discover now all my app pages from the middle of my phone and not at the top?

    How can I get the phone and messages apps in my dock? And for some reason, I discover now all my app pages from the middle of my phone and not at the top?

    Try

    Settings > general > reset > reset home screen presentation.

    Note: All other applications will be organised by alphabetical order.

  • How I change the fonts and colors of default return?

    I changed the font and the color of the text through the Tools button and the button options and the tab content. I can't find anything tell me how to change the fonts and colors to the colors and fonts by default. Can you advise me? I use Windows 7 Home Premium OS. Thank you.

    Hi Brenda19605,

    You can use this article to set the fonts and colors: https://support.mozilla.org/en-US/kb/change-fonts-and-colors-websites-use?esab=a & s = do & r = 0 & s = as

    The default settings for the police are in this article:
    https://support.Mozilla.org/en-us/KB/some%20text%20shows%20up%20bold%20after%20upgrade

    Unfortunately for the default color has no good reference. For the text, but it is black (most lower-left), the background is white (color above left). Unvisited links is blue (column 8, line 5) and the visited link is purple (column 9, line 5).

    Let me know if you need help more!

    Lordfreak

Maybe you are looking for