Monitor changes made by a desktop app to a file created by my Windows Store app - file-upload

I'm making a Windows Store app that gets files from a server and store it locally for quick access. I also want to make it sync the file with Dropbox and push changes to Dropbox if the user make any. I looked into CachedFileUpdater and it seems to work if I use another Windows Store app to edit the file. However I ran into a great trouble trying to monitor changes made by a desktop app. This matters a lot because many files are office documents and Office 2013 is available to Windows RT and I would also like the app to be available to Windows 8.
First I tried to use CachedFileUpdater on all files but when I open the file using a desktop app, it will be opened in read-only mode and I can't save it in desktop mode. If I dont use it if the user chooses to open it with desktop app, the change will be saved but later my app won't be able to access that file somehow. I guess it is because the owner changes to the desktop app. Now not only I seem to have no way to monitor the file changes, but also can't I access those changes once it is modified by a desktop app.\
Is there some trick that may help? Thank you very much!

Related

Open a downloaded file with a third party application

I have an application that allows users to download files from the server, these files can be pretty much anything.
I am at the point where a user is able to download a file to their phone but I can not figure out how to allow the user to open the files from the app, for example say a user has download a word file (.docx), when they select the file in my application I want the file to either open in the default .docx viewer or present the user with applications that can open the file. (Similar to how WhatsApp handles it)
I have tried using Linking.openURL('file:///pathtofile/filename.docx') but I get an error saying Could not open URL file:///pathtofile/filename.docx, exposed beyond app through Intent.getData()
I'm currently using Expo and would much prefer not to have to detach my app.
Update:
I ended up detaching from Expo and built native modules to handle this.

Can I install my own Windows Phone App on a real device without uploading the app to Store?

I'm new to windows phone, and I don't have a real device to test on.
I know that one can install .XAP files from SD card.. but does this process reqires internet access to check that the app is on the store or I just installs it as in Android?
Thanks in advance
You can debug your app on your physical device in Visual Studio. Your device has to be connected via usb cabel to your computer and has to be developer unlocked. You can developer unlock your phone with the Windows Phone Developer Registration Tool, which is a part of the Windows Phone SDK. You can find more information about the process here.
No, you cannot install the xap package on other people devices until unless their phones are not developer unlocked. When you build a .xap package in Release mode, you need to first upload it to Store where the Microsoft team checks package for security concerns. Once that has been checked, package verified, then the packages can be installed, basically uploading the app.
To debug the app, its better to unlock your friend's phone and then test it on it. After that if you wish you can also un-register the phone to revert back to original developer locked mode.
There is one more method which I use when my app is completed but do not wish to release the app on store, but instead, I wish that first these apps be used by my friends first, they give feedback and after that I finally submit the app on Store.
To do this, I submit the app in private visibility on Store. There is an option while submitting the app which indicates whether you want that other users can see your app on phone. I mark it Hidden. Once my app is verified and is on store, I download the app from store by going to the appropriate link of app on store which is given in app profile at dev-center. I choose 'Download and Install Manually' option to download the xap. This xap can be installed on other devices without unlocking their device.

Filelauncher save files

Let's say i have a list of files. When I click on one it will get downloaded and saved into the app's isostore. Then it's opened in the default viewer/editor on the windows phone like this:
Windows.System.Launcher.LaunchFileAsync(file);
But when I make some changes to the file and want to save it, it can't, because it's a read-only copy of the file. Is there some way to get write-access to the file or else some public/shared (iso)store that every app has access to? The goal is to download the file, edit it and upload it back to the server.
Per the Windows Phone documentation, the Windows.System.Launcher.LaunchFileAsync API is not implemented for the Windows Phone platform:
Windows Phone 8: This API is not implemented and will throw an
exception if called.
In regards to saving the file so that it can be accessed by other applications, this is not possible, unless the file you are dealing with is a photo, in which case you could use the Media Library API.

Accessing application's documents from device through USB?

I'm working with a Windows Phone 8 application that writes logs to a file on the device. Is there a way to get access to that file? If not, what are my alternatives to seeing log information outside of using Visual Studio?
Yes you can read the file from isolated storage as long as it's a developer app installed on a developer unlocked phone. I use the Windows Phone Power Tools to do this, and there is a command line tool that comes with the SDK itself as well called IseTool.exe.
For your own access you can just use the advice in Paul's answer. If you want to get the files from other users you can use the Email Task and attach the log file to the email and have it sent to you or use some form of server logging.

Restart/shutdown mac remotely from iOS through SSH?

I set up my old laptop as a media server and created a mac application in AppleScript that would remotely restart or shutdown the mac depending on which button was pressed, using this code:
tell application "Finder" of machine "eppc://USERNAME:PASSWORD#MYSERVER"
shut down
end tell
It's super simple, and was easy to write, but now I want to create an iPad app that can accompany the mac one. Ideally, I'd like to use AppleScript as, like I said, it's very simple, but I feel like that's not an option.
What are some other ways to do this? Where I would click a button, then it would connect to my mac and either shutdown or restart.
I feel like the best way would be to use SSH, and right now I'm looking at https://github.com/x2on/libssh2-for-iOS. Any other ideas?
Okay, just to brainstorm.... Dropbox is a great way to share content among machines, but it's also a pretty darn decent communication mechanism.
I use Dropbox to fire up (legal only!) bittorrent downloads on my home machine by setting up my torrent client to watch a dropbox folder for incoming .torrent files. I can then save .torrents into that directory on any machine I have Dropbox on, or in principle from a browser on my iOS devices that could share to Dropbox, and ta-da, instant remote kickoff. I can sit on another machine, save a .torrent to that directory, watch its file extension change to .torrent.imported, and know that when I get back to my main machine, that thing will be downloaded.
You could use folder actions or a cron job to watch a certain Dropbox folder for commands, and then put files into that folder that trigger those scripts to perform certain behaviors. Dropbox has a very nice iOS client library, making it totally possible to store stuff to Dropbox from a custom app.