How to browse files in blackberry using a program - blackberry

I want to write a program that launches the blackberry's home screen and then browse the file i required and when i click on import option i want to retrieve the path of that selected file. Is it possible in blackberry? if yes please guide me

Try FilePicker (ignoring the "launches the blackberry's home screen" part of your question which isn't very clear).
If FilePicker is not working for you, find a way to open the built-in Media app which has an Explore menu to browse the filesystem (on OS 7 at least) -- kind of what you'd do with "intents" on android the bb equivalent of which would be CHAPI.

Related

Opening a local file with InAppBrowser under iOS doesn't work

I am developping a mobile application using Cordova. This application allows users to navigate in a kind of a file manager and allows them to download files. I use the plugin "FileTransfer" to download the file on the user's device and then call the InAppBrowser (version 0.5.2) plugin in order to open it.
While it works really great under Android, I can't say the same under iOS (tested under versions 7 and 8).
This is the line of code I use to open the downloaded file:
window.open(entry.toURL(), "_system");
Under Android, it proposes the user which application he wants to launch to open the file or launches automatically the default application based on the file extension. Under iOS, the file is downloaded and then nothing happens. I have found out I could use the integrated viewer of the InAppBrowser plugin when the user is under iOS. I do that in this way:
if (navigator.userAgent.match(/iPhone|iPod|iPad/))
window.open(entry.toURL(), "_blank");
else
window.open(entry.toURL(), "_system");
With these lines of codes, if the user is under iOS, the integrated viewer is launched and displays the file. The problem is for ZIP files or other files that can't be rendered in the viewer. This one says "Load Error".
I think that if "_system" worked, Safari would be launched and would propose the user how he wants to open the file.
Does anybody have an idea of how I can make "_system" worked in iOS? Is this eventually a known problem (I couldn't find anything related to my problem)?
If this can be relevant to my problem, I use Phonegap Build in order to generate the .ipa file.
On iOS when you use _system, it try to open the url you pass with safari.
As iOS have sandbox access limitations, safari can't open the url because it's inside your app sandbox.
You can try this plugin, it provides an "open with" dialog that will show you the apps that support the type of file you want to open if any available.
https://build.phonegap.com/plugins/1076

How to support Open in feature in iOS App?

My app is PDF Reader and i want to support Open in feature like when open PDF in Safari , We can open PDF in another PDF Reader app with Open in Feature.
So my app support for (.PDF) file and want to show my app on the lists of Open in App like following pic.
I don't know what is that and how to use it?
Please explain or guide me to good tutorials.
Sorry if my question is duplicated.
It's very simple, you only need to register the file types that your app supports. You can check more on
https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html#//apple_ref/doc/uid/TP40010411-SW1

PDF view in blackberry?

I am working on an Blackberry application in which I have to show some PDF files in my application.
I know we can show the PDF file as a GOOGLE document, I have already done that. But this time my task is to show PDF files inside application.
Do we have any option to show PDF files in our own application by using some SDK's ?
Please suggest me.
I dont think any blackberry sdk support this facility.
There is only one option to view pdf files offline is to download and view using a third party pdf viewer.
Even blackberry dont have given a built in pdf reader to user,when I was looking for the same issue I found that only one company SLG Mobile has made this app(beamreader) and blackberry gave them very special award(dont remember award name now),
so this third party app is free for one month and after that you have to pay nearly 500 Rs as licence fee.
Now for BB10 Adob has created a reader and it comes with device itself.

How to copy html files to ipad and then launch in a browser

Here's a crazy question...The client wants a web application to be available on the ipad when not connected to the internet. My first thought was that it would be a great opportunity to use the offline app feature of HTML5, except that the entire web app (including all the media) is 3GB, and apparently all of it must be available. This exceeds the 5MB limit of the app cache. The website does not necessarily have to rely on any dynamic server side code. It can be straight HTML files. Does anyone know if it would be possible to manually copy the entire website onto the ipad and from there easily launch it in a browser? I was not able to do this, but I have to believe there's a way. Any other approaches to this problem that you can think of? Thank you.
I had a similar problem and here's what I found that worked (using an iPad and a PC):
Download (on the PC) the program HTTrack to the PC. This program can create an offline mirror of a website and has all sorts of options for what gets included.
Run HTTrack on the PC and create a folder for your website.
Install (on the iPad) the free App "Documents 5" by Readdle.
Connect Documents 5 to some sort of cloud based storage (I used by Google drive account, but I'm sure Drop Box would work also)
Zip the entire offline website folder mirrored using HTTrack and upload the zip file to cloud storage (Google drive)
Click on the zip file in Documents 5. It should be downloaded to the iPad
Click on the downloaded zip file in Documents 5. It should be automatically extracted.
Now open the extracted folder and click on index.html. This is your website offline.
I don't know if there is a way to move the index link to the home screen...
There are several apps that can be used for storing files on the iPad and viewing them in an embedded browser. I use GoodReader, but this might be overkill for your purpose.
I've been able to view them using FileApp (after transferring via DropBox), but it's far less than ideal.
Use hightail.com, you can link a website as a space, it will actually convert the website to preview image, then can be access on iPad as webpage in browser, no need to copy file to iPad or install any software.

Blackberry open file

I use the browser to open a pdf file, but I want to use the regular file manager in order to open the file with a third party application. How do I do that?
BrowserSession page = Browser.getDefaultSession();
page.displayPage("file:///SDCard/BlackBerry"+Integer.parseInt(tab[4])+".pdf");
It depends on OS version. In OS 5 RIM added the net.rim.device.api.ui.picker.FilePicker class that does what you need. For pre 5 OS you have to implement your own screen to select a file from the file-system. Your local BB SDK should contain a sample app for this, search by "fileexplorerdemo" to find that sample and to see the code.

Resources