Is there an API or any other way to sync a particular format of file between Windows Phone and SkyDrive? I've tried just downloading and uploading files but it doesn't work as I want. I want them to be always in sync.
Yes. Here are a couple links on the subject:
http://windowsteamblog.com/windows_live/b/windowslive/archive/2011/12/07/skydrive-apis-for-docs-and-photos-now-ready-to-cloud-enable-apps-on-windows-8-windows-phone-and-more.aspx
http://www.itproportal.com/2011/12/13/microsoft-skydrive-api-now-available-third-party-windows-phone-apps/
http://www.windowsphonegeek.com/news/Using-SkyDrive-in-your-Windows-Phone-applications-part-1
Related
I have a Windows 10 universal app that is running on a Windows 10 Mobile device. I noticed from the Windows 10 Mobile device, it does have a file explorer but it limits you to only see certain "Known Folders" such as music, documents, downloads, etc... and that is all.
Furthermore, when I plug the device into my development machine via USB, I can browse the device but again, only the Known Folders above.
In my app, I am writing to a log file and that log file is stored to LocalStorage, under a folder for my app name, for example:
var dataPath = ApplicationData.Current.LocalFolder.Path;
I simply need to browse MY LOG FILE, that MY APP CREATES, in MY APP FOLDER. I read about a ton of, in my opinion hacks, to get access to this file/folder. For example, there are some third party applications that still mainly claim to target Windows Phone 8/8.1 but will still technically work for 10 such as:
Windows Phone Power Tools
Isolated storage spy
etc....
Then I also read articles on how to use a file in Pictures (or voice recording) and go to file properties to then gain access to the root or to create a root shortcut on the development machine and copy it to the mobile device, however, these are typically a year or more old and no longer work on my device (I suspect MS patched these hacks).
So, all that said, I would like to see a good way to access the root drive for development, or at least my app folder in the LocalFolder so I can access my files (such as logs or the sqlite db file). Maybe there is a way already but my google searches haven't turned anything up just yet.
Thanks!
As you've known, we can use some third party tools like IsoStoreSpy or Windows Phone Power Tools to access Isolated Storage. Although they are designed for Windows Phone 8 & 8.1, but they can also be used for Windows 10 Mobile. With these two tools, we can access LocalFolder, TemporaryFolder and RoamingFolder. For more info, see similar question: Accessing storage of simulator/device while debugging.
Besides these third party tools, there is also build-in support in Windows 10. We can use App File Explorer to view and manipulate files stored by your sideloaded apps. This is a new, cross-platform version of the Isolated Storage Explorer from Windows Phone 8.1. This tool should be able to work no matter your application is deployed in Debug mode or Release mode. But please note that this is a new tool added to Windows Device Portal in the Anniversary Update.
To use this feature, we must enable Device discovery and Device Portal. Then we can access application storage in web browser like following:
For more info, please see Device Portal for Mobile and Using the App File Explorer to see your app data. Also the similar question: Windows 10 Mobile: how can I see inside on my app folder? might be helpful.
I had a similar problem to solve few months back. I ended up doing two things:
I've implemented a 'Send Logs' button in settings that would upload logs to a ftp server. Actually it was a bit more than that, all installations of this app were managed by a central server and there was 'Get logs' button on the server side that would send request via push channel to the device to get the logs.
Got my hands on a Interop-unlocked device that I would use if the app was in a state that would make first option not possible.
I am making a universal application for windows phone 8.1. I want to upload a file to server in background. Microsoft provides BackgroundUploader class which contains BeginUploadAsync method which uploads whole file in a single request in background.
I want to upload file in chunks to the server. But i am not able to find anyway to upload file in chunks. Is there any alternative?
There is no any built-in support for uploading files "chunk by chunk". If you really need to upload files in a such way, you should split file into parts manually and upload them separately.
My iOS application allows a user to store files such as PDF's, Images, etc. We need to synchronize the app files to the cloud as we also offer the user a web portal to view the same data. I use WCF (Mtom encoding/streaming) in my Windows Forms app but this is not working in Xamarion.iOS (MonoTouch). There seems to be a problem with Mtom message encoding so I'm looking at an alternate and/or better way of getting files uploaded reliably such as streaming, showing progress, and using async await in C# 5 if possible.
What method do you recommend and if you have any sample code or links this would be great. Also, what is required in IIS 7.5 as I run Windows Server 2008 R2. Lastly, any firewall issues as I run a Watchguard appliance so if I need to open anything to allow this to work please advise. I assume though this would occur over HTTP or HTTPS.
I've done some research on web client, webDAV, etc, but not sure what is really the best approach for this scenario.
Thank you.
HttpClient (async) or WebClient will handle uploads just fine. You can create an ASP.NET upload handler or MVC action to read a HTTP posted file.
Some helpful links:
C# HttpClient 4.5 multipart/form-data upload
Getting the upload progress during file upload using Webclient.Uploadfile
http://haacked.com/archive/2010/07/16/uploading-files-with-aspnetmvc.aspx
Edit:
See Larry OBrien's answer explaining the iOS 7 native MonoTouch.Foundation.NSUrlSession which allows background transfers.
iOS 7 introduces a new class, MonoTouch.Foundation.NSUrlSession, which is the preferred way to transfer larger files to and from the Web. NSUrlSession transfers can work when the application is in the background.
The programming model is explained in this article.
Here is a sample application that demonstrates the technique.
I have some xmls which I want to put on server and in my windows phone, I will be downloading the these files and then program will do its calculations.But I don't want to put the files on server, instead of that I want to use Dropbox/Skydrive or any other to download these files. Is it good to go, or it will have too many overheads?
Or please suggest where I should store the files so later I can download the files to use under my windows phone application.
Dropbox officially haven't release SDK for windows phone yet, you can still use it using SharpBox project, click here.
Skydrive is better option, specially for windows phone application as both runs on same platform and provide better features. Response time of Skydrive on windows phone should be faster than Dropbox.
Hi
I would like to retrieve documents from an ftp in my Windows phone 7 application (built with XNA in my case).
As far as I understand WP7 does not support ftp due to port and protocol(?) contraints.
Is there any way to get ftp support working?
I guess I will be able to implement it my self once socket support is added but I dopn't wan't to wait for that.
Cheers
/Jimmy
Since there are no supported socket capabilities in the initial release of WinPhone , you cannot directly FTP. You would have to create an "FTP Proxy" web service which your phone would call and have the service do the actual FTP and relay the files.
FTP and Sockets are not supported by the platform at the moment.
If you want to get remote files on to your phone you'll have to use HTTP(S).
You can do this either with the HttpWebRequest or WebClient classes depending on your specific needs.
Do you want to retrieve files fromn the phone, and over the cellular network? If so you need to confirm your operator allows ftp connections to your phone, which they probably do not.
If you're connecting over wifi, you've got more chance of this working.
Otherwise, you could implement a dropbox-style approach where the phone and your file-retrieving application both connect to a remote server
If this is for development purposes, you can get access to the phones storage and copy in files by using Microsoft's SmartDevices API.
I'm trying to do the same but so far the only way I've found around it is to create a web service to run on my own server which retrieves the FTP files on behalf on the phone.
Wish MS would hurry up and give us sockets - calling a web service is fine but I'm pretty sure it would be slower than directly getting the FTP files from the phone itself.