Sharing files between metro and desktop app - windows-runtime

I have a desktop app which creates files under c:\ProgramData folder on windows 7. (I can't move the files location to document folder.) I want to provide a metro version of this application as well. The metro application should be able to read and write the same files which are created by the desktop version. As I see, metro does not allow this in some obvious way. Is there a way to make that folder available to metro app?

Metro applications can't access most of the windows desktop folders. C:\ProgramData is not one of the allowed locations. See here for a list of the allowed locations and how to get to them.

You can add possibility to 'send' your data to your desktop app from WinRT app. Try to use sharing contract (check there and there ) for this. I understand that isn't well solution for this but it is better than nothing.
EDIT: This way isn't possible. I've just checked and get message - Nothing can be shared from desktop.

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 .

OneDrive not available in FilePicker

I am playing alittle with windows phone 8.1 app creating. Using C# and phone emulator in VS2013. I have read on microsoft's page that i should be able to see OneDrive in standard file picker (msdn.microsoft.com/en-US/en-en/library/windows/apps/dn263258.aspx):
Use the built-in Windows features.
Whenever possible, use the Windows features and UI to host or interact
with OneDrive. For instance, use the file picker provided by the
Windows.Storage.Pickers namespace for opening and saving files. As
another example, have your app use the Windows application data APIs
to save smaller pieces of data across a user's devices.
I am using standard code from tutorial like:
openPicker.FileTypeFilter.Add("*");
StorageFile file = await openPicker.PickSingleFileAsync();
and it works but there is no OneDrive to choose. I have internet connection on emulated device and i am logged in to OneDrive.
Have you integrated your file picker with the OneDrive contract?: http://msdn.microsoft.com/en-us/library/windows/apps/hh465192.aspx
You can also use the Live SDK single sign-on feature for Windows Phone here: http://msdn.microsoft.com/en-us/library/dn631823.aspx This way, your app should work for your testing purposes because you are already signed in.
I hope this helps!

Where can I find files saved in ApplicationData.Current.LocalFolder while developing a Windows Phone 8.1 app?

To my understanding, WinRT apps store their application data in
C:\Users\{user}\AppData\Local\Packages
My Windows Phone 8.1 application seems to have its own folder there as well, with an odd name like
App.aba911777.a60e8.a46c0.aa90d.a5038d92d276e_8wekyb3d8bbwe
However, when I browse the directory, I cannot find any of the files I've saved to ApplicationData.Current.LocalFolder. They are definitely there, because if I re-run my app in the emulator (which hasn't been closed at all), can find the cached files. Presumably these files are saved somewhere on my actual hard drive; where would they be?
(LocalFolder.Path gives me C:\Data\Users\DefApps\APPDATA\Local\Packages\2cdc8aaf-b7fe-4bcb-992a-18ad6f140771_b83k3kj2dpxdw\LocalState but I'm not sure how to find that on my hard drive)
To transfer/access files on Windows Phone Emulator (also works with device) you can use:
Isolated Storage Explorer tool - here is a good link how to do it, and also one useful here.
a very nice tool is Isolated Storage Spy - which now supports also WP8.1
Windows Phone Power Tools from here - you will have to check if that already works with WP8.1.
Search your SQLite db file in "C:\Users\\AppData\Local\Packages\".
localFolder.Path gives you correct location. You are not able to find that folder because AppData is been hidden. Please change your PC settings to view this folder.
Thanks

WP8 Folder Access

Can an app access and create a specific folder in the Windows phone 8 environment? I'm looking at building an audiobook player app and want to allow the user to drop these into an audiobook folder on the phones drive itself instead of mixing with the music folder. Could an app at least read from a specific folder outside its isolated storage?
Secondly, if so, is there any equivalent of the ".nomedia" file in Android that my app could insert into the folder to exclude the audiobook folder from being scanned by the music players on the phone?
I'm struggling to find the appropriate documentation that will answer my questions, as most documentation seems specific to WP7
RE: .nomedia file
Overall what you're asking for isn't supported and isn't complimentary to the zen of WP8. While I understand your need to create a unique music experience the WP8 media ecosystem is centered around the Music+Video hub and apps should work with it. Creating an experience like you were describing would just feel disjointed and jarring on WP8.
RE: letting users drag & drop files in file explorer
Some WP8 phones support having a Micro-SD card added to the phone. That uSD card can be accessed from File Explorer and WP8 apps can read files from it. The uSD card can have a folder called "Music" which would be used by the Music+Video app and invisible to 3rd party apps. However, your app can read any files that aren't in those uSD reserved folders. You can signup to file extensions but most media WP8 file extensions are reserved for 1st party experiences.
RE: Music Hub Integration
Please make sure to integrate your music player into the Music+Video hub otherwise it'll likely get downvoted to oblivion.