I am developing a data capture web app, primarily targetting iPad usage. Multiple users will primarily capture data on iPads, but then a manager will typically download all captured records onto a PC.
Even though the file download will primarily target PCs, I am pondering whether I should try and support file downloads to the iPad itself.
The server app is an MVC2 ASP.NET app, and I'm using a controller that returns a File result. Test code is as follows:
public ActionResult DownloadResponseData(string profileid)
{
string billcsv = "account_ref,line1,line2,line3";
var data = System.Text.Encoding.UTF8.GetBytes(billcsv);
string filename = "billfor.csv";
return File(data, "text/csv", filename);
}
Even though the majority of people will download to their PCs, because I am supporting full-screen iPad usage I am using the following client-side code to initiate the file download:
var url="/Download/DownloadResponseData?profileid=" + downloadRequest.profileid + "&unique=" + escape(Date());
window.open(url);
This works fine for non-iPad usage - it downloads the file nicely in Chrome.
My questions are numerous: does it make sense to download a CSV file to an iPad? Does an iPad support CSV? Do I need other software on the iPad to view a CSV file? How should I change the above code to download 'cleanly' to an iPad?
When I run the code above on the iPad, then it simply displays the entire CSV file contents within the iPad window - it doesn't seem to recognise the http response as a file.
Sorry for the rather obtuse question. Thanks.
Yes it makes sense to download csv files to the iPad, a number of iPad apps can deal with them successfully.
However, I find that mobile safari is hit or miss - it will download my activity in csv from the Amex web site okay (displays in spreadsheet form and offers to open in Numbers, DropBox, and other apps), but when I click download to get a csv file of activity on the Chase site, nothing at all happens. I even tried a third part web browser, same thing (although they all use the same webkit underneath I guess).
Related
I'm currently working on a intranet webapp for a company.
I've created it so the administrators of the site are able to upload files
(.docx, .pdf, .xlsx, .ppt etc) up to the webapp, to provide easier access
to documents for the employees. It works very well, however my client wasn't
too fond of having to download the files, and wanted it to pop up in the browser,
or open up the file-spesific program instead of download.
I was playing with some ideas:
1. Somehow parse the files to JSON at upload, and then show the content in browser with html.
2. Generate a pdf from the uploaded file (which automatically launches in the browser).
3. Somehow use a previewer to show the filecontent in the browser
4. Clients computer launches the uploaded file automatically on download, however I think this is a bit more tricky...
What would be the best and most time-efficient way to go about this?
It feels like what you actually want/need is a javascript document viewer (only) such as http://viewerjs.org/.
i have to create a product presentation tool that runs offline on an ipad.
i have a program wirtten in c# to create a presentation and this program has an export function, this export function creates a whole little homepage (only html and javascript) with the product slider - everything works fine, also the online presentation is perfect.
but the capital problem is, how could i run this offline on the ipad?
what i already tried:
- put the scripts to dropbox and tried to start index.html on ipad (the local links doesnt work)
- i tried to chache the whole page, but that was too much for caching..
there is also one solution i would prefer -> phonegap, but there i see the problem with creating the app... the c# programm should prepare everything, so the clients should take this exported file/files or direcotry and but it anywhere and the ipad should run this presentation offline.
thanks guys
You can try to make a simple app with UIWebView inside and load your local resources into this UIWebView.
Here are some similar questions on how to make it:
First
Second
Third
The way your clients are able to add the presentation files might be using iTunes File Sharing. And you can get these files from Documents directory
Hope this will help.
I am using XE5 to create a mobile app and one thing I need to do is be able to download a PDF as a byte stream via a datasnap server, store it on the local device and then open it.
I have manage to download and store a PDF on the local device (not using datasnap server yet, but simply using an Indy HTTP control. This works okay for now and the document is definitely stored on the local device.
Now I am trying to open it and am struggling to figure out how to.
This filename points to the correct file:
filename := TPath.Combine(TPath.GetDocumentsPath, 'Test.pdf');
This points to
/Users/versodev/Library/Application Support/iPhone Simulator/7.0.3/Applications/96674DE6-7997-48F9-9892-1383EBCE473B/Documents/Test.pdf
I have tried using the Apple.Utils class in the samples folder and using SharedApplication.OpenURL but this does not work (even if I convert the filename to a NSUrl).
Interestingly though, the canOpenURL returns true.
Any ideas on how I can simply open a PDF document that is stored in the Documents folder of the app on the local device? I don't mind using a default app (eg Safari), or creating a control in my app to view it.
(I have tried using the UIDocumentInteractionController but am not totally sure how it works)
For my business I need to be able to show a potential client a website I generate with a program called Pano2VR, which is a virtual tour program. This program takes some panoramic photos linked with each other and can generate a virtual tour out of them (as example: www.casas-fotoart.de/virtualtours ). The output this App gives can be either HTML5, Flash or both (flash if available and html5 for mobile devices, for example).
I need to be able to show that on my iPad while offline. i haven't found any solution for that so I tried to build a easy App for that, which I thought it wouldn't be complicated.
I generated a html5-only virtual tour and I droped the output into the "Suporting Files" group on the Xcode project. I added a UIWebView and on viewDidLoad I set it so it loads the html file.
The files I'm droping are like these (these inside the ipad folder):
The html file loads into the webView, but it just displays "This content requires HTML5/CSS3, WebGL, or Adobe Flash Player Version 9 or higher.", even though when loading these files from the net, it loads perfectly. I know this message comes from the html file.
Any idea on how to make it work will be much appreciated. Thanks in advance.
Your problem is this probably - XCode is mangling the JS files, I assume because it's trying to compile them
I want to display a list of swfs and allow the user to click on one and have it display. I wanted to use PDF, but need a little more interaction for the user. I've searched around for some swf -> iphone converters, but I want to just display the swf as PART of an app.
Any recommendations?
SWF used to be short for Shockwave/Flash. It is not an "open" file type and requires a huge framework to work correctly, one of which is support for ActionScript. There doesn't seem to be such a framework right now, even Skyfire doesn't do the rendering natively but tries to convert it through a server.
This is possible via CS5->IOS export. It's not the most smooth, but it will allow you to load external swfs. The only gotcya is that the external swfs cannot contain any actionscript (bummer).
Here's a simple example of flash to ios.