Open a file in a default application
Hi all!
I use to develop a BlackBerry JDE 4.2 application. I want to open a file in the default application supported by the BlackBerry device.
Let me explain in depth. Whenever the user selects a file to open, I want to open this file in the default application without talking to the unit in which the application file should be opened. JDE 4.3 and later, this can be achieved by using javax.microedition.content.Invocation and javax.microedition.content.Registry API. Here is the snippet of code, how it can be done in JDE 4.3 or later.
Invocation invocation; invocation = new Invocation("file:///store/samples/contacts/BlueDress.png"); Registry _registry=Registry.getRegistry("net.rim.device.api.content.BlackBerryContentHandler"); _registry.invoke(invocation);
The above code opens the BlueDress.png file in the default application.
But this is not supported in JDE 4.2 and earlier version.
Can someone help me how can I achieve the same JDE 4.2?
Thank you
-Rohan
As you say, we support JSR-211 Content Manager API in JDE/Handheld versions v4.3.0.
For the mime-types that can support the BlackBerry browser, you can call the browser with the particular URL (whether on the internet or the local file system). Take a look at these KB articles:
Tariq
Tags: BlackBerry Developers
Similar Questions
-
Whenever I try to open or run all I get - choose the program you want to use to open this file and its default Adobe Acrobat and he always answers this file type is not supported. I can't open anything on my desktop, tried to reinstall Java, and even in my computer it asks me to choose a program to open it. Help! I don't know what is happening!
* original title - try to refresh, to run or install anything whatsoever, and it will not open executable files.*
Hi LisaPisani,
(1) did you the latest changes on the computer?
(2) when was the last time it was working fine?
Method 1
See the Microsoft article below and try the steps mentioned, check if it helps.
How to change or choose the program that starts when you double-click a file in Windows XP
http://support.Microsoft.com/kb/307859
Method 2
If the previous step fails then I would suggest that you perform the system restore point when it worked very well and check if it helps.
How to restore Windows XP to a previous state
-
Failed to open the file in the ERP application published on a user's system.
Hi all
I published an ERP application with vWorkspace .we 8.0 are able to successfully connect to ERP via the web url but the problem is that once we export any file in EXCEL (Option of ERP) then it does not open using the end-user Office great program.
Can anyone suggest on the same.
Thank you
Jean Claude
The really easy way is when you export the Excel document, export it to a fileshare that is accessible from the local computer.
You can then simply open this file from file sharing and associations of local file will open it in the local excel for you.
-
When I click on a file .nrl extension (belongs to the autonomy I - manage your software) it returns a string of code (which is in the shortened link) instead of following the link and the return document. Is it possible to say Forefox connect to the document that the shortcut is linked to? The .nrl file extension belongs to a piece of software called FileSite (document management system).
What type of content is displayed in "tools > Page Info > general" If you open a file of this type?
- Press F10, or press the Alt key to bring up the 'Menu Bar' temporarily if the menu bar is hidden.
As displayed above, simply configure the server to send this file with the MIME type supported for Firefox to open a dialogue rather than make the file.
-
Open an image in the default application
Hello
I have an air application and would like to know if it is possible to open an image that resides on a server in the application default to the current computer with out loading or something - click the = button open directly.
Currently I use navigateToURL (new URLRequest ("FILE PATH '")) and opens as expected in a browser, but I want to open it as if opened directly...
Thank you.
Sigh - HATE when the obvious answer is correct:
var file:File = File.applicationDirectory.resolvePath("//SERVER/Production/testImage.jpg");
file.openWithDefaultApplication)
-
SQL Server 2003 change open query file dialog box default to the details
When you use the open the SQL query file dialog box, and then select Details to see the dates, etc..
It's always come back for when the list opened again very boring and tedious.
I managed to set the directories of the default folder for more details, running Windows XP
but have had no luck with SQL Server. If someone has conquered it?
Hi ArmintaForrer,
The question you have posted is better suited to the MSDN forums. You can ask your question in the help link.
http://social.msdn.Microsoft.com/forums/en-us/category/SQLServer/
Hope the helps of information.
-
How to start/run/open a file programmatically?
Is it possible to start a file programmatically? I want to give tha path to a file and launch the file with its associated default application.
For example, I want to be able to do this:
Start ("sample.jpg")-> as a result, the image is opened with its associated Viewer
Start("info.pdf")-> Accordingly, the pdf file is opened with its associated pdf viewer, if available
("Music.mp3") start-> start the mp3 with the default player
I just found this thread:
It seems to be a solution. I will write again once I have check if this approach works for me.
-
Change your default application to open files HTML on Mac (was: transfer)
Hi all
I have a question about the transfer. I recently moved from a Windows to an iMac. I was able to transfer all my files on successfully but I'm not able to import my site in Adobe muse on my iMac. All applications run very well, but when I go to open the files they are default Dreamweaver and when I try to open them with muse they are greyed out. I'm fairly new but basically, I want to use the muse for the site that I have already created. Thanks to you all
Esmeralda
You cannot open HTML with Muse, on a PC or a Mac files.
You definitely need the .muse file.
-
How to set the PS CC as default application for RAW Mac files.
What is happening on my Nikon and my Fuji SLR. All of a sudden it will not open in Photoshop CC. It is opening in Photoshop Elements, which is also in my Mac. I want to change it back so that when I click on a RAW file, it opens automatically in PS CC instead of elements. I can click on OPEN WITH and click on CC PS to open it, but I don't want to have to do this extra step.
Hi JoeRouton,
Please visit the following link to set the default application like Photoshop for RAW files.
Default application: How to change the default applications on Mac | IVous
Let me know if it helps.
Kind regards
Tanuj
-
programmatically launch a file with the default windows application
I thought it would be a trivial task, but I can't seem to be able to find something about it. I would like to be able to open any file in the native application - as if the user has double-clicked on it. Any suggestions?
Joined a VI I use that does what you want. If the given path is a folder, then it opens a file Explorer window in this folder. If the path is a file, then it opens the file, as if the user double clicked on it. She uses the mentioned command-line function previously.
-
Start the associated application to open the file
Open a file with an associated application format, for example on my device I have to Document To Go, then open a file manager. doc and open the program to display, then how could open a file with associated program my request
See the link:
-
Open the files on Mac (Fusion 5)?
I use parallel Desktop for 2 years, but decided to try VMWare Fusion after running into a few problems of stability with the Mountain Lion. So far, he has been pretty good, but I wonder if the merger does not have some features of Parallels.
On Parallels, I could open a Word document or an Excel worksheet with Office on my VM or in Office 2011 on my Mac in 'right click' and selecting 'Open with' a program for Mac that is on the list. 5 merger there similar functionality? I still have the Mac programs see the upward in the context menu, but if I select the option nothing happens. I selected the checkbox "Open your Windows and web links using Mac applications files" tab by default Applications.
Take a look at: Sharing Applications between your Mac and your virtual Windows Machines
Note: even if the link above is the topic in the VMware Fusion 5.0 Documentation Center Online however it is also available from the application VMware Fusion itself via the Help menu!
-
Open the file using InvokeQuery
I have successfully implemented action on the PART, using the following code:
InvokeActionItem* shareItem(InvokeActionItem::create( InvokeQuery::create() .parent(page) .invokeActionId("bb.action.SHARE") .mimeType(mimeType) .uri(fileURI))); page->addAction(shareItem, ActionBarPlacement::OnBar);
It works beautifully. For each file my application download and store in the file system, a menu of ACTION item appears, that I can use for example to send the file to someone else.
Now, I tried to implement the same for action OPEN to open a file in a different application. This does not at all. Here is my code:
InvokeActionItem* openInItem(InvokeActionItem::create( InvokeQuery::create() .parent(page) .invokeActionId("bb.action.OPEN") .mimeType(mimeType) .uri(fileURI))); page->addAction(openInItem, ActionBarPlacement::OnBar);
But I only get this in the log:
Warning: 15:09:54.649 InvocationWrapper::onQueryFinished: no matching result from Menu Service for query mimeType="application/pdf" uri=QUrl("file:///accounts/ ... /myFile.PDF") data= "" metadata= QMap() perimeter= 0 action= "bb.action.OPEN" target= "" invokerIncluded= false
I also tried to use the 'data' instead of 'uri' and passing in a QByteArray that contains the bytes of the file. This does not work either.
Curiously, if I leave aside the 'data' and 'uri', it works. A menu open item is displayed, which lists the applications that can open the specified MIME type. But of course this menu opens only the apps, it does not pass the uri of a file or data file.
Is this a limitation of devices Dev Alpha? Or y at - it another way to open files that are stored locally in other applications?
They are in the data area. But it wasn't the problem. I now have the confirmation that everything works as expected on a real device of the Z10. So the problem seems to be a limitation of the Alpha Dev OS.
-
Opening a file using the Webutil_Host.Host command
Dear gurus
I am opening a file using command behind a button on my next form:
Webutil_Host.host('x:\03\03\39920000023.gif');
I was waiting for this command to open the file given in default, gif image viewer, but it does nothing when I press the button. So should I try something else?Try this
-
Until today, I had no trouble opening the files Adobe Acrobat with Adobe Reader 9.5. (I need to use an older version of Adobe Reader, because I use a program called Macro Express, which does not recognize later versions.) As of this morning, when I click on a file Acrobat, I wonder what program I want to open it with. Even when I click on 'do this automatically... ". ', it is not doing. He asks me every time. I went to tools, Applications and changed all the questions to open with Adobe Reader related 9.5 pdf. This also does not work.
access firefox options > applications and set the default action for the portable document (pdf) format.
Maybe you are looking for
-
Is not harmful for your iPhone to stay all day plugged?
I recently bought the Apple Smart box, and after a week of use, I was wondering if is not bad for your phone or even for the internal battery, in charge of all day or be connected every time? I know that all the products Apple has a guarantee of flaw
-
Guys, it is advisable to use low-power mode even if it is not yet on 20%? What will happen then?
-
Tecra s10 - 15z - can not find drivers for Windows 10
Hellodoes anyone know were I can find a driver for device wide band Mobile Toshiba F3507 for Windows (64-bit) 10 and a driver for authentic Tec Inc AES1610 also for Windows 10?Thank youWim
-
Under settings, where device iPad or serial number starting with a D?
Parameters of sixth, where can I find my device number, begins with a "D"?
-
[Transferred to LAVA] Available in cross-post code Hello I have VITs who call the other VITs or CSTT in some of my models. I want to open a reference to a template and save the new screw/CTL the disk programmatically but I get errors My code works fi