how to download audio file from from uri and save in local folder in windows phone 8? - windows-phone-8

I've got various types of ringtone in my server. I need to know how to read those audio files and save into my Windows Phone 8 directory.

How large are the files? The BackgroundTransferRequest API is one way you could download files. It is especially useful for larger files. Since this class downloads in the background it is nice in that you can navigate around your app and even leave it without having to cancel your download.
It also has some built-in functionality that will help limit downloads when you are on wireless vs wifi so your app won't accidentally eat up your user's data plan.
Here's some info on Background file transfers:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202955%28v=vs.105%29.aspx
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202959%28v=vs.105%29.aspx
An alternative is using an Http request using either the HttpWebRequest or WebClient classes. These options are good when you have smaller files and when you know you have a stable network connection. They will also work with larger files but they don't have the extra features that BackgroundTransfer API has for longer running downloads.
http://developer.nokia.com/community/wiki/Making_a_HTTP_request_and_listening_its_completion_in_Windows_Phone

Related

link to a file on windows shared drive from an iPhone

I want to send an HTML email with link in them. The link should open files from a windows shared drive. The users will already be logged in to the network via VPN.
I've tried
Test Report
This works fine when opening on a PC but I can't figure how to open this in an iPhone although the users accessing the network thru a VPN client on their phone.
I'm open to use any third party solution
This link is for IPADs, but it should work with Iphone as well:
https://discussions.apple.com/thread/3978480?tstart=0
According to Apple's forum, you need to use some sort of third party software to access files, like filebrowser (link in the forum page). Personally, I use filebrowser and it works fine for me. It works kind of like WinSCP for windows. It pulls data from a Server (your vpn) and allows you to download and modify on your phone. It is cross platform compatible, so it is great if you have multiple devices. I have heard that FileExplorer Pro is exceptional, but I have not tried it. Here is the link to fileexplorer on the app store:
https://itunes.apple.com/us/app/fileexplorer-pro/id499470113?mt=8
EDIT:
As far as I know, this is not possible from any mobile device. Best bet is to send the file through a secure email, such as ProtonMail.
iOS is less flexible when it comes to file management and file associations, so there’s less you can do with these files. However, you can still open a video file directly from your shared folder and play it on your device or access other media files in a similar way. You could also use the “Open In” feature to open a file in a specific app.
The Windows network file sharing protocol is known as CIFS, which is an implementation of the SMB protocol.
this guide may help you. this is not exact answer about what you want though. https://www.guidingtech.com/27119/access-shared-windows-iphone-ios-wifi/

Titanium Windows Phone: How can i save a file in visible folders?

I'm developing a windows phone application built with Titanium SDK 5.2.2.
I'm not able to save a file in directories directly accessible by the device (like Downloads directory).
I tried to use the only supported functionalities of Titanium API Titanium.Filesystem.getFile and Titanium.Filesystem.File.write, but the only way to save the file is to use Ti.FileSystem.applicationDataDirectory or Ti.File.resourcesDirectory to decide the path where store it.
It seems that, using these API, I cannot store file in one of the directories visible by the device(Documents, Downloads, Photos, Music), and then make them available inside the device.
Can I perform this download in the path visible to the device such as Downloads folder?
You might be able to use the externalStorageDirectory location:
https://github.com/appcelerator/titanium_mobile_windows/blob/e3ecddfe13179509e3b8d0699141763262ef5a97/Source/Filesystem/src/Filesystem.cpp#L81
We've had a similar request to expose the Downloads/Documents folder for iOS. I'd suggest to add a comment to request parity for Windows or create a new ticket:
https://jira.appcelerator.org/browse/TIMOB-23197
I opened an issue on Appcelerator JIRA for this question:
https://jira.appcelerator.org/browse/AC-3615 .

PhoneGap store HTML Files on Device

I have to build an App for Windows Mobile and iOS. So I decided to create this with PhoneGap.
The app should only display HTML-Files.
These files are stored on a server and can change every day.
So I created already an API which delivers the files.
My solution would be:
In my PhoneGap-App I use AJAX to get the files (this is no problem and should already work...).
To the question:
How can I store the files on the device? Is this possible with PhoneGap?
The app have to work offline too (because of this I need to store the files)...
And if this is possible: It should sync only the differences (between device/app and server) --> keyword rsync??
Thank you for your help!
Emanuel :)
Have you checked here?
You can definitely store files locally on android platform.(I have already done that). However, I haven't done it on IOS.
So please investigate, if features I gave the link above, available for safari (IOS).
Synching only diff should be implemented on the server side and should be responsibility of your API.
Yes you can store files locally.
I would recommend the Phonegap File Transfer plugin for downloading files. It supports iOS and Windows phone 7 and 8 and can download and save the file locally. At the Cordova file plugin github you can see the paths where you can save the files for iOS, I haven't found a table for windows phone yet.
But I would not recommend you download the HTML files since they can be very big. You should dynamically create the mobile pages you need, since you would only need to download the displayed text and attributes for some HTML-tags.
The way you can do this is by having a server back-end where you can change the content of the pages. The plain HTML should then be saved in a database with a creation and modification timestamp(needed to check if you have the latest updates). You would then pull the data out of the database with your PHP and echo it as a JSON. Your app just has to make a AJAX-GET request to the server and save the data locally in a database. I would recommend the Cordova SQLite Storage plugin for the local database. Whenever a page is opened you should dynamically create a mobile page.
This way your app doesn't request huge amount of data from a server, which can be more appealing to your app users.

Saving files on local machine by Chrome app

My chrome app needs to save a file with human-readable or standard format such as SQLite (It should be readable outside Chrome).
Is there any API suitable for this purpose?
Some files with .localstorage extension (SQLite format) are in Chrome\User Data\Default\Local Storage folder. Is it possible to create such files by the app?
Edited: The app should not ask user for extra permission.
Thanks for your consideration.
chrome.fileSystem API is what you need.
You will need to ask the user at least once where to save the file, but then you can retain the entry to write again to the same file/folder.
There is no way around asking the user to "escape the sandbox".
You'll want to use the Quota Management API. This is per-origin storage, and you request specific amounts of quota.
It sounds like you also want your users to open the files directly? There's an HTML5 filesystem explorer Chrome app that you can use. It'll show you the files, and you can figure things out from their URLs (e.g. I'm currently using filesystem:http://localhost:8000/temporary/bar for a local experiment).
Or are you looking for something more user friendly? I think you have to use file save in that case, the same way Google Drive does.

Abobe Air/Flex 4.6 Remote File Viewer

I have a Air/Flex desktop application and I'm trying to create a component within the app that can view files on the web server is is already connected to. It just needs to access one particular folder that will contain PDFs, Images & Word documents. I also want the ability to click on the files and having them open in their default desktop applications.
Is this possible and how would I go about doing this?
It's possible but not with your Flex/AIR app alone. It cannot view files/directories on server by itself but it can communicate with your server via webservices, AMF, or any other back end based service. Typically the back end reads the folder and send this information to your app. Your app can open those files in corresponding app but only if those files are available on disk so your app will have to download them prior to opening them.
Every Application has different needs but I myself usually save anything to a desktop or you can use the App storage container as well. As I use only the desktop I download what is needed OR been asked for, and the visitor has the choice of keeping it or if not needed it gets automatically deleted! this way you can use whatever PDFs, Word, Images etc. use read and write (re-write) as well as creating PDFs on the fly with Images, text etc, and that way a visitor also can print directly at his or her own leisure. regards aktell